The firmware of the Grove Node
Dependencies: BLE_API color_pixels mbed-src-nrf51822 nRF51822
Fork of BLE_LoopbackUART by
udriver.h
00001 00002 #ifndef __UDRIVER_H__ 00003 #define __UDRIVER_H__ 00004 00005 #include <stdint.h> 00006 00007 typedef struct _driver_t driver_t; 00008 typedef enum _data_type_t data_type_t; 00009 00010 struct _driver_t { 00011 int (*init)(void *obj, void *params); 00012 int (*read)(void *obj, void *data); 00013 int (*write)(void *obj, void *data); 00014 int (*fini)(void *obj); 00015 00016 uint8_t d; // dimention 00017 data_type_t *type; 00018 00019 uint16_t id; 00020 char *name; 00021 }; 00022 00023 enum _data_type_t { 00024 DATA_TYPE_PENCENTAGE = 1, 00025 DATA_TYPE_TEMPERATURE = 2, 00026 DATA_TYPE_HUMIDITY = 3, 00027 DATA_TYPE_LIGHT = 4, 00028 DATA_TYPE_RED = 5, 00029 DATA_TYPE_GREEN = 6, 00030 DATA_TYPE_BLUE = 7, 00031 DATA_TYPE_ACCELERATION = 8, 00032 DATA_TYPE_ACCELERATION_X = 9, 00033 DATA_TYPE_ACCELERATION_Y = 10, 00034 DATA_TYPE_ACCELERATION_Z = 11, 00035 DATA_TYPE_ROTATION = 12, 00036 DATA_TYPE_ROTATION_X = 13, 00037 DATA_TYPE_ROTATION_Y = 14, 00038 DATA_TYPE_ROTATION_Z = 15, 00039 }; 00040 00041 00042 #endif // __UDRIVER_H__
Generated on Fri Jul 15 2022 20:43:51 by 1.7.2