2024-12-02 22:15:50 +08:00
|
|
|
|
#include "mw_bluetooth.h"
|
|
|
|
|
|
2024-12-17 21:18:40 +08:00
|
|
|
|
// /* user external inc. */
|
|
|
|
|
// #include "mw_soft_timer.h"
|
|
|
|
|
|
2024-12-03 22:49:37 +08:00
|
|
|
|
|
|
|
|
|
// Initial the entity of bluetooth buf.
|
|
|
|
|
mw_bluetooth_t bluetooth_drv_buf[bluetooth_num];
|
|
|
|
|
|
2024-12-17 21:18:40 +08:00
|
|
|
|
/*************************************************************************************
|
|
|
|
|
* @brief Get the bluetooth object
|
|
|
|
|
* @param[in/out] e_val<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ע<EFBFBD>͡<EFBFBD>
|
|
|
|
|
* @return mw_bluetooth_t<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵע<EFBFBD>͡<EFBFBD>
|
|
|
|
|
*
|
|
|
|
|
* @warning <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ⱦ<EFBFBD><EFBFBD>桿
|
|
|
|
|
* @note <EFBFBD><EFBFBD><EFBFBD>ش<EFBFBD><EFBFBD>ġ<EFBFBD>
|
|
|
|
|
*************************************************************************************/
|
|
|
|
|
mw_bluetooth_t mw_get_bluetooth_drv(bluetooth_type_enum e_val)
|
2024-12-03 22:49:37 +08:00
|
|
|
|
{
|
2024-12-17 21:18:40 +08:00
|
|
|
|
if(e_val >= bluetooth_num)
|
|
|
|
|
{
|
|
|
|
|
while(1);
|
|
|
|
|
}
|
|
|
|
|
return bluetooth_drv_buf[e_val];
|
2024-12-03 22:49:37 +08:00
|
|
|
|
}
|
|
|
|
|
|
2024-12-17 21:18:40 +08:00
|
|
|
|
// static void
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void mw_bluetooth_drv_init(void)
|
|
|
|
|
{
|
|
|
|
|
// bluetooth_drv_buf[hc06].bluetooth_drv = hc06;
|
|
|
|
|
|
|
|
|
|
// bluetooth_drv_buf[hc06].get_systick_ms = get_systick_ms;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|