static int nio_serial_ioctl(void *dev_context, void *fp_context, unsigned long int request, va_list ap) { NIO_SERIAL_DEV_CONTEXT_STRUCT *serial_dev_context = (NIO_SERIAL_DEV_CONTEXT_STRUCT *)dev_context; switch (request) { case IOCTL_ABORT: #if PLATFORM_LPUART_ENABLED LPUART_DRV_AbortSendingData(serial_dev_context->instance); LPUART_DRV_AbortReceivingData(serial_dev_context->instance); #else UART_DRV_AbortSendingData(serial_dev_context->instance); UART_DRV_AbortReceivingData(serial_dev_context->instance); #endif break; default: break; } return 0; }
void PORTA_IRQHandler(void) { /* Clear interrupt flag.*/ PORT_HAL_ClearPortIntFlag(PORTA_BASE_PTR); if (GPIO_DRV_ReadPinInput(g_switch1.pinName)) { TPM_DRV_PwmStop(0, ¶m, 3); PIT_DRV_StopTimer(0, 0); } else { position = 0; PIT_DRV_StartTimer(0, 0); } if (GPIO_DRV_ReadPinInput(g_switch2.pinName)) { LPUART_DRV_AbortSendingData(1); laser_on = 0; } else { laser_on = 1; } if (!GPIO_DRV_ReadPinInput(g_switchUp.pinName)) { txBuff[0] = 'R'; } if (!GPIO_DRV_ReadPinInput(g_switchLeft.pinName)) { txBuff[0] = 'G'; } if (!GPIO_DRV_ReadPinInput(g_switchRight.pinName)) { txBuff[0] = 'B'; } if (!GPIO_DRV_ReadPinInput(g_switchDown.pinName)) { txBuff[0] = 'T'; } if (!GPIO_DRV_ReadPinInput(g_switchSelect.pinName)) { cue_next_image = 1; } }