/************************************************************************************************** * @fn Hal_ProcessPoll * * @brief This routine will be called by OSAL to poll UART, TIMER... * * @param task_id - Hal TaskId * * @return None **************************************************************************************************/ void Hal_ProcessPoll () { /* Timer Poll */ #if (defined HAL_TIMER) && (HAL_TIMER == TRUE) #error "The hal timer driver module is removed." #endif /* UART Poll */ #if (defined HAL_UART) && (HAL_UART == TRUE) HalUARTPoll(); #endif /* SPI Poll */ #if (defined HAL_SPI) && (HAL_SPI == TRUE) HalSpiPoll(); #endif /* HID poll */ #if (defined HAL_HID) && (HAL_HID == TRUE) usbHidProcessEvents(); #endif #if defined( POWER_SAVING ) /* Allow sleep before the next OSAL event loop */ ALLOW_SLEEP_MODE(); #endif }
/************************************************************************************************** * @fn Hal_ProcessPoll * * @brief This routine will be called by OSAL to poll UART, TIMER... * * @param task_id - Hal TaskId * * @return None **************************************************************************************************/ void Hal_ProcessPoll () { #if (defined HAL_VDDMON) && (HAL_VDDMON == TRUE) HalVddMonPoll(); #endif #if ((defined HAL_I2C) && (HAL_I2C == TRUE) && (defined HAL_I2C_POLLED) && (HAL_I2C_POLLED == TRUE)) HalI2CPoll(); #endif #if (defined HAL_UART) && (HAL_UART == TRUE) HalUARTPoll(); #endif #if (defined HAL_SPI) && (HAL_SPI == TRUE) HalSpiPoll(); #endif #if (defined HAL_HID) && (HAL_HID == TRUE) extern void usbHidProcessEvents(void); usbHidProcessEvents(); #endif }
void Hal_ProcessPoll () { /* Timer Poll */ #if (defined HAL_TIMER) && (HAL_TIMER == TRUE) HalTimerTick(); // Àˬd²×¤îªºcounter #endif /* UART Poll */ #if (defined HAL_UART) && (HAL_UART == TRUE) HalUARTPoll(); // Poll the UART #endif /* SPI Poll */ #if (defined HAL_SPI) && (HAL_SPI == TRUE) HalSpiPoll(); #endif /* HID poll */ #if (defined HAL_HID) && (HAL_HID == TRUE) usbHidProcessEvents(); #endif }
/************************************************************************************************** * @fn Hal_ProcessPoll * * @brief This routine will be called by OSAL to poll UART, TIMER... * * @param task_id - Hal TaskId * * @return None **************************************************************************************************/ void Hal_ProcessPoll () { #if defined( POWER_SAVING ) /* Allow sleep before the next OSAL event loop */ ALLOW_SLEEP_MODE(); #endif /* UART Poll */ #if (defined HAL_UART) && (HAL_UART == TRUE) HalUARTPoll(); #endif /* SPI Poll */ #if (defined HAL_SPI) && (HAL_SPI == TRUE) HalSpiPoll(); #endif /* HID poll */ #if (defined HAL_HID) && (HAL_HID == TRUE) usbHidProcessEvents(); #endif }