example/FeatherM0/usb_start.c
static bool usb_in_complete(const uint8_t ep, const enum usb_xfer_code rc, const uint32_t count)
{

	volatile hal_atomic_t __atomic;
	atomic_enter_critical(&__atomic);

	// only modify state if the transfer was on the BULK IN endpoint
	if(CONF_USB_CDCD_ACM_DATA_BULKIN_EPADDR == ep) {
		inbuf.ready    = true;
		inbuf.sent     = count;
		inbuf.lastCode = rc;
	}

	atomic_leave_critical(&__atomic);

	return false;		// The example code returns false on success... ?
}
/**
 * \brief Callback for USB to simply set a flag that data has been sent successfully.
 */
\brief Callback for USB to simply set a flag that data has been sent successfully.
\ brief Callback for USB to simply set a flag that data has been sent successfully .
static bool usb_in_complete(const uint8_t ep, const enum usb_xfer_code rc, const uint32_t count)
{
	volatile hal_atomic_t __atomic;
	atomic_enter_critical(&__atomic);
	if(CONF_USB_CDCD_ACM_DATA_BULKIN_EPADDR == ep) {
		inbuf.ready    = true;
		inbuf.sent     = count;
		inbuf.lastCode = rc;
	}
	atomic_leave_critical(&__atomic);
	return false;		
}
static bool usb_in_complete ( const uint8_t ep , const enum usb_xfer_code rc , const uint32_t count ) { volatile hal_atomic_t __atomic ; atomic_enter_critical ( & __atomic ) ; if ( CONF_USB_CDCD_ACM_DATA_BULKIN_EPADDR == ep ) { inbuf . ready = true ; inbuf . sent = count ; inbuf . lastCode = rc ; } atomic_leave_critical ( & __atomic ) ; return false ; }
\brief Callback for USB to simply set a flag that data has been sent successfully.
\ brief Callback for USB to simply set a flag that data has been sent successfully .
// only modify state if the transfer was on the BULK IN endpoint // The example code returns false on success... ?