Statistics
| Branch: | Tag: | Revision:

mongoose / examples / PIC32 / http_server / firmware / src / main.c @ eaef5bd1

History | View | Annotate | Download (3.89 KB)

1
/* clang-format off */
2
/*******************************************************************************
3
  MPLAB Harmony Project Main Source File
4

5
  Company:
6
    Microchip Technology Inc.
7

8
  File Name:
9
    main.c
10

11
  Summary:
12
    This file contains the "main" function for an MPLAB Harmony project.
13

14
  Description:
15
    This file contains the "main" function for an MPLAB Harmony project.  The
16
    "main" function calls the "SYS_Initialize" function to initialize the state
17
    machines of all MPLAB Harmony modules in the system and it calls the
18
    "SYS_Tasks" function from within a system-wide "super" loop to maintain
19
    their correct operation. These two functions are implemented in
20
    configuration-specific files (usually "system_init.c" and "system_tasks.c")
21
    in a configuration-specific folder under the "src/system_config" folder
22
    within this project's top-level folder.  An MPLAB Harmony project may have
23
    more than one configuration, each contained within it's own folder under
24
    the "system_config" folder.
25
 *******************************************************************************/
26

    
27
// DOM-IGNORE-BEGIN
28
/*******************************************************************************
29
Copyright (c) 2013-2014 released Microchip Technology Inc.  All rights reserved.
30

31
//Microchip licenses to you the right to use, modify, copy and distribute
32
Software only when embedded on a Microchip microcontroller or digital signal
33
controller that is integrated into your product or third party product
34
(pursuant to the sublicense terms in the accompanying license agreement).
35

36
You should refer to the license agreement accompanying this Software for
37
additional information regarding your rights and obligations.
38

39
SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
40
EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
41
MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
42
IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
43
CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
44
OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
45
INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
46
CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
47
SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
48
(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
49
 *******************************************************************************/
50
// DOM-IGNORE-END
51

    
52

    
53
// *****************************************************************************
54
// *****************************************************************************
55
// Section: Included Files
56
// *****************************************************************************
57
// *****************************************************************************
58

    
59
#include <stddef.h>                     // Defines NULL
60
#include <stdbool.h>                    // Defines true
61
#include <stdlib.h>                     // Defines EXIT_FAILURE
62
#include "system/common/sys_module.h"   // SYS function prototypes
63

    
64

    
65
// *****************************************************************************
66
// *****************************************************************************
67
// Section: Main Entry Point
68
// *****************************************************************************
69
// *****************************************************************************
70

    
71
int main ( void )
72
{
73
    /* Initialize all MPLAB Harmony modules, including application(s). */
74
    SYS_Initialize ( NULL );
75

    
76
    while ( true )
77
    {
78
        /* Maintain state machines of all polled MPLAB Harmony modules. */
79
        SYS_Tasks ( );
80

    
81
    }
82

    
83
    /* Execution should not come here during normal operation */
84

    
85
    return ( EXIT_FAILURE );
86
}
87

    
88

    
89
/*******************************************************************************
90
 End of File
91
*/
92