esp_nano_hosted/include/nh_ctrl_api.h

30 lines
720 B
C

#ifndef NH_CTRL_API_H
#define NH_CTRL_API_H
#include "nh_shared_if.h"
typedef void (*nh_ctrl_api_event_cb_init_t)(void *handle);
typedef struct {
nh_ctrl_api_event_cb_init_t init;
} nh_ctrl_api_cb_t;
typedef struct {
nh_shared_if_t *shared_if;
nh_osa_t *osa;
nh_ctrl_api_cb_t cb;
void *user_data;
/* Private states */
nh_osa_semaphore_t p_sem_req;
nh_osa_semaphore_t p_sem_resp;
uint8_t *p_buf_rx;
uint32_t p_buf_rx_len;
} nh_ctrl_api_t;
nh_ret_t nh_ctrl_api_init(nh_ctrl_api_t *api);
void nh_ctrl_api_task(nh_ctrl_api_t *api);
nh_ret_t nh_ctrl_api_get_mac_address(nh_ctrl_api_t *api, uint8_t *mac_addr);
#endif // NH_CTRL_API_H