NUCLEO-F401RE + BlueNRG shield client test (TI Sensortag reading)
Embed:
(wiki syntax)
Show/hide line numbers
sample_service.h
00001 #ifndef _SAMPLE_SERVICE_H_ 00002 #define _SAMPLE_SERVICE_H_ 00003 00004 #ifdef __cplusplus 00005 extern "C" { 00006 #endif 00007 00008 #include "cube_hal.h" 00009 #include "hal_types.h" 00010 #include "gatt_server.h" 00011 #include "gap.h" 00012 #include "string.h" 00013 #include "bluenrg_hci.h" 00014 #include "hci_internal.h" 00015 #include "gp_timer.h" 00016 #include "bluenrg_hci_internal.h" 00017 #include "hci.h" 00018 #include "hal.h" 00019 #include "sm.h" 00020 00021 #define TX_HANDLE 0x0011 00022 00023 #define RX_HANDLE 0x0014 00024 00025 #define READ_TIMEOUT 100000 00026 00027 void Make_Connection(void); 00028 void receiveData(uint8_t* data_buffer, uint8_t Nb_bytes); 00029 void sendData(uint16_t handle, uint8_t* data_buffer, uint8_t Nb_bytes); 00030 void enableNotification(void); 00031 void GAP_ConnectionComplete_CB(uint8_t addr[6], uint16_t handle); 00032 void GAP_DisconnectionComplete_CB(void); 00033 void GATT_Notification_CB(uint16_t attr_handle, uint8_t attr_len, uint8_t *attr_value); 00034 void GATT_Read_CB(uint16_t attr_handle, uint8_t attr_len, uint8_t *attr_value); 00035 void HCI_Event_CB(void *pckt); 00036 uint8_t *readValue(unsigned short handle, uint8_t* len); 00037 void moveMouse(int8_t x, int8_t y); 00038 00039 #ifdef __cplusplus 00040 } 00041 #endif 00042 00043 #endif /* _SAMPLE_SERVICE_H_ */
Generated on Tue Jul 12 2022 20:44:37 by 1.7.2