mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-07 16:01:30 +00:00
Revert "Stop publish examples to mongoose repo"
This reverts commit 1a17e17c462bdd4e1d26d8742f8b7087273e04c2. PUBLISHED_FROM=80028de308c9a021955d1425d2bfee8feb85f193
This commit is contained in:
1 parent
7cc7df8c0e
commit
eaef5bd133
351 files changed
+195424
No files matched your search
@@ -0,0 +1,126 @@
|
||||
/*
|
||||
* Copyright (c) 2016 Cesanta Software Limited
|
||||
* All rights reserved
|
||||
*/
|
||||
|
||||
#ifndef _APP_H
|
||||
#define _APP_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include "system_config.h"
|
||||
#include "system_definitions.h"
|
||||
#include "simplelink.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
extern "C" {
|
||||
|
||||
#endif
|
||||
/* Application states
|
||||
|
||||
Summary:
|
||||
Application states enumeration
|
||||
|
||||
Description:
|
||||
This enumeration defines the valid application states. These states
|
||||
determine the behavior of the application at various times.
|
||||
*/
|
||||
|
||||
typedef enum {
|
||||
APP_STATE_INIT = 0,
|
||||
APP_STATE_SERVICE_TASKS,
|
||||
APP_STATE_CONNECT_BROKER,
|
||||
APP_STATE_DONE
|
||||
} APP_STATES;
|
||||
|
||||
// *****************************************************************************
|
||||
/* Application Data
|
||||
|
||||
Summary:
|
||||
Holds application data
|
||||
|
||||
Description:
|
||||
This structure holds the application's data.
|
||||
|
||||
Remarks:
|
||||
Application strings and buffers are be defined outside this structure.
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
/* The application's current state */
|
||||
APP_STATES state;
|
||||
} APP_DATA;
|
||||
|
||||
/*******************************************************************************
|
||||
Function:
|
||||
void APP_Initialize ( void )
|
||||
|
||||
Summary:
|
||||
MPLAB Harmony application initialization routine.
|
||||
|
||||
Description:
|
||||
This function initializes the Harmony application. It places the
|
||||
application in its initial state and prepares it to run so that its
|
||||
APP_Tasks function can be called.
|
||||
|
||||
Precondition:
|
||||
All other system initialization routines should be called before calling
|
||||
this routine (in "SYS_Initialize").
|
||||
|
||||
Parameters:
|
||||
None.
|
||||
|
||||
Returns:
|
||||
None.
|
||||
|
||||
Example:
|
||||
<code>
|
||||
APP_Initialize();
|
||||
</code>
|
||||
|
||||
Remarks:
|
||||
This routine must be called from the SYS_Initialize function.
|
||||
*/
|
||||
|
||||
void APP_Initialize(void);
|
||||
|
||||
/*******************************************************************************
|
||||
Function:
|
||||
void APP_Tasks ( void )
|
||||
|
||||
Summary:
|
||||
MPLAB Harmony Demo application tasks function
|
||||
|
||||
Description:
|
||||
This routine is the Harmony Demo application's tasks function. It
|
||||
defines the application's state machine and core logic.
|
||||
|
||||
Precondition:
|
||||
The system and application initialization ("SYS_Initialize") should be
|
||||
called before calling this.
|
||||
|
||||
Parameters:
|
||||
None.
|
||||
|
||||
Returns:
|
||||
None.
|
||||
|
||||
Example:
|
||||
<code>
|
||||
APP_Tasks();
|
||||
</code>
|
||||
|
||||
Remarks:
|
||||
This routine must be called from SYS_Tasks() routine.
|
||||
*/
|
||||
|
||||
void APP_Tasks(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _APP_H */
|
||||
Reference in new issue
Block a user