Files
ESPC3-wireless/app/drivers/sertrf/sertrf.h

91 lines
1.5 KiB
C
Raw Normal View History

2025-08-20 11:28:11 +08:00
#pragma once
#include "device.h"
2025-08-20 11:31:55 +08:00
#include "../led_strip/led_strip.h"
#include "key.h"
#include "protocol/p_protocol.h"
2025-09-09 18:16:48 +08:00
#include "protocol/resend_protl.h"
2025-10-07 17:49:20 +08:00
#include "protocol/stmisp.h"
2025-09-09 18:07:30 +08:00
#include "ota_u.h"
#include "../../config/app_config.h"
#define FC_ADDRESS "0x08000000"
2025-08-20 11:28:11 +08:00
typedef struct
{
device_t device;
os_thread_t embedded_thread;
os_thread_t pc_thread;
os_thread_t task_thread;
os_thread_t app_thread;
2025-09-09 18:07:30 +08:00
ota_u_t otau;
2025-10-07 17:49:20 +08:00
//自定义协议
2025-09-09 18:16:48 +08:00
resend_device_t resend_device;
SemaphoreHandle_t resend_read_mutex;
2025-10-07 17:49:20 +08:00
//STMISP协议
stmisp_device_t stmisp_device;
uint32_t fc_address;
2025-08-20 11:28:11 +08:00
}sertrf_t;
typedef struct
{
char ble_name[32];
char wifi_ap_ssid[32];
char wifi_ap_password[32];
char wifi_sta_ssid[32];
char wifi_sta_password[32];
}sertrf_stauct_t;
2025-08-20 11:28:11 +08:00
/**
* @brief
*/
void sertrf_init(void);
/**
* @brief
*/
void sertrf_start(void);
/**
* @brief
*/
void sertrf_stop(void);
/**
* @brief
*/
void sertrf_rf_switch(uint8_t on);
2025-08-20 11:28:11 +08:00
/**
* @brief
*/
void sertrf_status(void);
/**
* @brief embedded thread
*/
void embedded_thread(void* arg);
2025-09-09 18:07:30 +08:00
/**
* @brief pc thread
*/
void pc_thread(void* arg);
/**
* @brief app thread
*/
void app_thread(void* arg);
/**
* @brief task thread
*/
void task_thread(void* arg);
/**
* @brief
*
* @param connect
*/
void pc_link_rgb_color(device_t* device);
2025-08-20 11:28:11 +08:00