一、数组类型强转为结构体类型
typedef struct
{
uint8_t cmd;
uint8_t frame;
uint16_t len;
uint8_t data[0];
}beken_ota_pkt;
void ota_send_handler(uint8_t *pbuff, uint16_t len)
{
beken_ota_pkt_s* beken_ota_pkt = (beken_ota_pkt_s*)pbuff;
}