only: 'void'?
This commit is contained in:
parent
63e939add5
commit
d594502594
|
@ -29,14 +29,14 @@ static bool isUsbSerialInitStarted = false;
|
||||||
// called from the USB IRQ handler
|
// called from the USB IRQ handler
|
||||||
static void onUsbDataReceived(uint8_t* pu8Data, uint32_t u32ReceviedSize) {
|
static void onUsbDataReceived(uint8_t* pu8Data, uint32_t u32ReceviedSize) {
|
||||||
osalSysLockFromISR();
|
osalSysLockFromISR();
|
||||||
|
|
||||||
// copy the data to the FIFO buffer
|
// copy the data to the FIFO buffer
|
||||||
for (int i = 0; i < u32ReceviedSize; i++) {
|
for (int i = 0; i < u32ReceviedSize; i++) {
|
||||||
if (iqPutI(&usbBuf.fifoRxQueue, *pu8Data++) != Q_OK) {
|
if (iqPutI(&usbBuf.fifoRxQueue, *pu8Data++) != Q_OK) {
|
||||||
break; // todo: ignore overflow?
|
break; // todo: ignore overflow?
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// tell the reader thread to wake up
|
// tell the reader thread to wake up
|
||||||
#if 0
|
#if 0
|
||||||
if (threadrx != NULL) {
|
if (threadrx != NULL) {
|
||||||
|
@ -112,7 +112,7 @@ static const struct BaseChannelVMT usbChannelVmt = {
|
||||||
|
|
||||||
BaseChannel SDU1 = { .vmt = &usbChannelVmt };
|
BaseChannel SDU1 = { .vmt = &usbChannelVmt };
|
||||||
|
|
||||||
|
|
||||||
static void usb_VBus_handler(uint8_t channel) {
|
static void usb_VBus_handler(uint8_t channel) {
|
||||||
// call it only if the USB driver is already initialized
|
// call it only if the USB driver is already initialized
|
||||||
if (isUsbSerialInitialized)
|
if (isUsbSerialInitialized)
|
||||||
|
@ -149,7 +149,7 @@ void usb_serial_start(void) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool is_usb_serial_ready(void) {
|
bool is_usb_serial_ready() {
|
||||||
return isUsbSerialInitialized /*&& SDU1.config->usbp->state == USB_ACTIVE*/;
|
return isUsbSerialInitialized /*&& SDU1.config->usbp->state == USB_ACTIVE*/;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#ifndef USBCONSOLE_H_
|
#ifndef USBCONSOLE_H_
|
||||||
#define USBCONSOLE_H_
|
#define USBCONSOLE_H_
|
||||||
|
|
||||||
void usb_serial_start(void);
|
void usb_serial_start();
|
||||||
bool is_usb_serial_ready(void);
|
bool is_usb_serial_ready();
|
||||||
|
|
||||||
#endif /* USBCONSOLE_H_ */
|
#endif /* USBCONSOLE_H_ */
|
||||||
|
|
|
@ -12,8 +12,8 @@ extern "C"
|
||||||
{
|
{
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
void usb_serial_start(void);
|
void usb_serial_start();
|
||||||
bool is_usb_serial_ready(void);
|
bool is_usb_serial_ready();
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue