Exemplo n.º 1
0
void UsbSerial_onUsbWritten(void *pArg, unsigned char status, unsigned int received, unsigned int remaining)
{
  UNUSED(pArg);
  if( status == USBD_STATUS_SUCCESS ) {
    usbSerial.justWrote += received;
  }
  if( remaining <= 0 )
    SemaphoreGiveFromISR( usbSerial.writeSemaphore, 0 );
}
Exemplo n.º 2
0
void UsbSerial_onUsbData(void *pArg, unsigned char status, unsigned int received, unsigned int remaining)
{
  UNUSED(pArg);
  UNUSED(remaining);
  if( status == USBD_STATUS_SUCCESS ) {
    usbSerial.rxBufCount += received;
    usbSerial.justGot = received;
  }
  SemaphoreGiveFromISR( usbSerial.readSemaphore, 0 );
}
Exemplo n.º 3
0
void __attribute__((interrupt, no_auto_psv, naked)) _DMA3Interrupt() {
  portSAVE_CONTEXT();
  _DMA3IE = 0;
  SemaphoreGiveFromISR(event);
  portRESTORE_CONTEXT();
}