xref: /btstack/port/archive/pic32-harmony/src/main.c (revision bfc39f3e53bffb178d46475fc3f3e00a92502490)
1*bfc39f3eSMatthias Ringwald #include <stddef.h>                     // Defines NULL
2*bfc39f3eSMatthias Ringwald #include <stdbool.h>                    // Defines true
3*bfc39f3eSMatthias Ringwald #include <stdlib.h>                     // Defines EXIT_FAILURE
4*bfc39f3eSMatthias Ringwald #include "system/common/sys_module.h"   // SYS function prototypes
5*bfc39f3eSMatthias Ringwald 
main(void)6*bfc39f3eSMatthias Ringwald int main ( void )
7*bfc39f3eSMatthias Ringwald {
8*bfc39f3eSMatthias Ringwald     /* Initialize all MPLAB Harmony modules, including application(s). */
9*bfc39f3eSMatthias Ringwald     SYS_Initialize ( NULL );
10*bfc39f3eSMatthias Ringwald 
11*bfc39f3eSMatthias Ringwald     while ( true )
12*bfc39f3eSMatthias Ringwald     {
13*bfc39f3eSMatthias Ringwald         /* Maintain state machines of all polled MPLAB Harmony modules. */
14*bfc39f3eSMatthias Ringwald         SYS_Tasks ( );
15*bfc39f3eSMatthias Ringwald 
16*bfc39f3eSMatthias Ringwald     }
17*bfc39f3eSMatthias Ringwald 
18*bfc39f3eSMatthias Ringwald     /* Execution should not come here during normal operation */
19*bfc39f3eSMatthias Ringwald     return ( EXIT_FAILURE );
20*bfc39f3eSMatthias Ringwald }