Version FC
Dependencies: DmTftLibrary eeprom SX1280Lib filesystem mbed
Fork of MSNV2-Terminal_V1-5 by
Diff: main.h
- Revision:
- 8:cd489b7c49a0
- Child:
- 10:1b37e3b41947
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.h Wed Aug 22 13:03:00 2018 +0000 @@ -0,0 +1,111 @@ +/* + * MISNet + * + * Main + * + * Created on: August 17, 2018 + * Author: Francis CHATAIN + * + */ + +#ifndef __MAIN_H__ +#define __MAIN_H__ + +#include "mbed.h" + + +#define FIRMWARE_VERSION 7.6 + +#define ID_TERMINAL 111 +#define ID_GATEWAY 55 + +//DigitalOut led2 ( LED2 ); + +typedef enum { + SENSOR = 1, + ACTUATOR = 2, + RECODER = 3 +} CHANNEL_DEVICE_TYPE ; + + +// A compléter au fur et a mesure et remonter l'info sur les applications center +typedef enum { + NOT_IDENTIFIED = 0 , // Configuration nouvelle ou non référencée + IKS01A2 = 1 , // List des composant + SMART_TERMINAL = 2 // BME280 + .... +} DEVICE_ID ; + +typedef enum { + HTS221 = 1, + LPS22HB = 2, + LSM303A = 3, + LSM6DSL = 4, + BME280 = 5, + DS18B20 = 6 +} CHANNEL_COMPONENT_ID; + +typedef uint8_t CHANNEL_GROUP ; + +typedef uint16_t CHANNEL_VALUE_TYPE ; + +typedef enum { + ENABLE_ = 1, // ACTIV + DISABLE_ = 0 // SLEEPING +} CHANNEL_STATE ; + +typedef uint8_t CHANNEL_ACCES_PIN ; + +typedef enum { + GPIO_ = 1, + I2C_ = 2, + SPI_ = 3, + UART_ = 4 +} CHANNEL_ACCESS_TYPE ; + + +typedef uint8_t CHANNEL_ACCESS_PIN ; + +typedef enum { + BY_VALUE = 1, // wakeup by irq + BY_THRESHOLD = 2 // wakeup by watchdog timer +} CHANNEL_UP_MODE ; + +typedef enum { + IRQ_ = 1, // wakeup by irq + TIME_ = 2 // wakeup by watchdog timer +} CHANNEL_REQUEST_MODE ; + +typedef uint32_t CHANNEL_TIMER_DIVIDE ; + +typedef float CHANNEL_THRESHOLD_DELTA ; +typedef float CHANNEL_THRESHOLD_UP ; +typedef float CHANNEL_THRESHOLD_DOWN ; + +typedef enum { + MESSAGE = 1, // Send Message + MESSAGERELAY = 2 // Send Message + ON/OFF internal relay +} CHANNEL_ACTION; + +typedef enum { + IO = 1, // ON/OFF + PWD = 2 // PWD modulation +} CHANNEL_OUTPUT ; + +/* mbed-os only +typedef struct { + uint8_t channel ; + uint16_t typeValue ; + uint8_t P1 ; + uint16_t P2 ; + float F1 ; + float F2 ; + float F3 ; +} message_t; + +//MemoryPool<message_t, 32> mpool; +//Queue<message_t, 32> queue; +*/ + + + +#endif // __MISNet_H__ \ No newline at end of file