1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- #ifndef NRF_CLI_CDC_ACM_H__
- #define NRF_CLI_CDC_ACM_H__
- #include <stdbool.h>
- #include "nrf_cli.h"
- #include "app_usbd_cdc_acm.h"
- #ifdef __cplusplus
- extern "C" {
- #endif
- extern const nrf_cli_transport_api_t nrf_cli_cdc_acm_transport_api;
- extern const app_usbd_cdc_acm_t nrf_cli_cdc_acm;
- typedef struct {
- nrf_cli_transport_handler_t handler;
- void * p_context;
- } nrf_cli_cdc_acm_internal_cb_t;
- typedef struct {
- nrf_cli_transport_t transport;
- nrf_cli_cdc_acm_internal_cb_t * p_cb;
- } nrf_cli_cdc_acm_internal_t;
- #define NRF_CLI_CDC_ACM_DEF(_name_) \
- static nrf_cli_cdc_acm_internal_cb_t CONCAT_2(_name_, _cb); \
- static const nrf_cli_cdc_acm_internal_t _name_ = { \
- .transport = {.p_api = &nrf_cli_cdc_acm_transport_api}, \
- .p_cb = &CONCAT_2(_name_, _cb), \
- }
- #ifdef __cplusplus
- }
- #endif
- #endif
|