#ifndef __MW_BLUETOOTH_H__ #define __MW_BLUETOOTH_H__ #include "stm32f10x.h" typedef enum { hc06 = 0, bluetooth_num }bluetooth_type_enum; typedef struct { void * usart_type; void (*pf_init)(void); void (*pf_deinit)(void); // tx rx function int8_t (*pf_tx_byte)(uint16_t tx_data); uint16_t (*pf_rx_byte)(void); }system_usart_t; typedef struct { uint32_t (*pf_get_systick_ms)(void); }system_timetick_t; typedef struct { bluetooth_type_enum bluetooth_drv; system_usart_t bluetooth_usart; system_timetick_t get_systick_ms; void (*pf_init)(void); void (*pf_deinit)(void); void (*pf_send_bytes)(uint8_t * tx_buf, uint16_t len); void (*pf_recv_deal)(void); }mw_bluetooth_t; #endif