C++ and SDK

I am migrating my project to C++.  Everything in the SDK works so far except NRF_BLE_GATT_DEF().  This returns the error C++ requires a type specifier for all declarations.  Is there a workaround?

Parents
  • Another error occurs in the APP_USBD_CDC_ACM_GLOBAL_DEF:

    static void cdc_acm_user_ev_handler(app_usbd_class_inst_t const * p_inst, app_usbd_cdc_acm_user_event_t event);
    
    /**
     * @brief CDC_ACM class instance
     * */
    APP_USBD_CDC_ACM_GLOBAL_DEF(m_app_cdc_acm,
    	cdc_acm_user_ev_handler,
    	CDC_ACM_COMM_INTERFACE,
    	CDC_ACM_DATA_INTERFACE,
    	CDC_ACM_COMM_EPIN,
    	CDC_ACM_DATA_EPIN,
    	CDC_ACM_DATA_EPOUT,
    	APP_USBD_CDC_COMM_PROTOCOL_AT_V250);
    	


    Error invalid conversion from 'void (*)(const app_usbd_class_inst_t*, app_usbd_cdc_acm_user_event_t)' {aka 'void (*)(const app_usbd_class_inst_s*, app_usbd_cdc_acm_user_event_e)'} to 'app_usbd_cdc_acm_user_ev_handler_t' {aka 'void (*)(const app_usbd_class_inst_s*, int)'} 

    Changing the event type to int gives another error about initialization.

Reply
  • Another error occurs in the APP_USBD_CDC_ACM_GLOBAL_DEF:

    static void cdc_acm_user_ev_handler(app_usbd_class_inst_t const * p_inst, app_usbd_cdc_acm_user_event_t event);
    
    /**
     * @brief CDC_ACM class instance
     * */
    APP_USBD_CDC_ACM_GLOBAL_DEF(m_app_cdc_acm,
    	cdc_acm_user_ev_handler,
    	CDC_ACM_COMM_INTERFACE,
    	CDC_ACM_DATA_INTERFACE,
    	CDC_ACM_COMM_EPIN,
    	CDC_ACM_DATA_EPIN,
    	CDC_ACM_DATA_EPOUT,
    	APP_USBD_CDC_COMM_PROTOCOL_AT_V250);
    	


    Error invalid conversion from 'void (*)(const app_usbd_class_inst_t*, app_usbd_cdc_acm_user_event_t)' {aka 'void (*)(const app_usbd_class_inst_s*, app_usbd_cdc_acm_user_event_e)'} to 'app_usbd_cdc_acm_user_ev_handler_t' {aka 'void (*)(const app_usbd_class_inst_s*, int)'} 

    Changing the event type to int gives another error about initialization.

Children
Related