example/FeatherM0/usb_start.c
static bool usb_line_state_changed(usb_cdc_control_signal_t newState)
{
	static bool callbacks_registered = false;	// prevents callbacks from being registered twice

	ctrlBuf.dtr = newState.rs232.DTR;
	ctrlBuf.rts = newState.rs232.RTS;

	if (cdcdf_acm_is_enabled() && !callbacks_registered) {
		callbacks_registered = true;
		/* Callbacks must be registered after endpoint allocation */
		cdcdf_acm_register_callback(CDCDF_ACM_CB_READ, (FUNC_PTR)usb_out_complete);
		cdcdf_acm_register_callback(CDCDF_ACM_CB_WRITE, (FUNC_PTR)usb_in_complete);
	}

	/* No error. */
	return false;
}
/**
 * \brief Callback invoked when Line State Change
 *
 * This function is called when there is a change to the RTS and DTS control
 * lines on the serial connection.
 *
 */
\brief Callback invoked when Line State Change
This function is called when there is a change to the RTS and DTS control
lines on the serial connection.
\ brief Callback invoked when Line State Change This function is called when there is a change to the RTS and DTS control lines on the serial connection .
static bool usb_line_state_changed(usb_cdc_control_signal_t newState)
{
	static bool callbacks_registered = false;	
	ctrlBuf.dtr = newState.rs232.DTR;
	ctrlBuf.rts = newState.rs232.RTS;
	if (cdcdf_acm_is_enabled() && !callbacks_registered) {
		callbacks_registered = true;
		cdcdf_acm_register_callback(CDCDF_ACM_CB_READ, (FUNC_PTR)usb_out_complete);
		cdcdf_acm_register_callback(CDCDF_ACM_CB_WRITE, (FUNC_PTR)usb_in_complete);
	}
	return false;
}
static bool usb_line_state_changed ( usb_cdc_control_signal_t newState ) { static bool callbacks_registered = false ; ctrlBuf . dtr = newState . rs232 . DTR ; ctrlBuf . rts = newState . rs232 . RTS ; if ( cdcdf_acm_is_enabled ( ) && ! callbacks_registered ) { callbacks_registered = true ; cdcdf_acm_register_callback ( CDCDF_ACM_CB_READ , ( FUNC_PTR ) usb_out_complete ) ; cdcdf_acm_register_callback ( CDCDF_ACM_CB_WRITE , ( FUNC_PTR ) usb_in_complete ) ; } return false ; }
\brief Callback invoked when Line State Change
 This function is called when there is a change to the RTS and DTS control
 lines on the serial connection.
\ brief Callback invoked when Line State Change This function is called when there is a change to the RTS and DTS control lines on the serial connection .
// prevents callbacks from being registered twice /* Callbacks must be registered after endpoint allocation */ /* No error. */