/*--------------------------------------------------------------------------- TITLE : Thread_LED WORK : ARG : void RET : void ---------------------------------------------------------------------------*/ void Thread_LED( void const *arg ) { u8 Ch; u8 Buf[64]; u32 i; while(1) { Hw_Led_Toggle(0); osDelay(100); for( i=0; i<64; i++ ) { if( HW_VCOM_Q_VAILD(0) ) { Buf[i] = Hw_VCom_Getch(); } else { break; } } if( i > 0 ) { if( osMutexWait(osMutex_VCom, 0) == osOK ) { //Hw_VCom_Send( Buf, i ); osMutexRelease(osMutex_VCom); } } } }
void LED_Tick( void ) { Hw_Led_Toggle(0); }