kendryte / kendryte-freertos-sdk

This project is no longer maintained Not recommended for product development.
Apache License 2.0
201 stars 67 forks source link

Timer can not work #31

Closed wipping closed 5 years ago

wipping commented 5 years ago

hello , I use the timer demo code in freeRTOS_programming_guide, but it can not work . And I try other way to make it work such as opening other timer , setting shorter interval .but both of them are invalid. This is my demo code.

void on_tick_test( void* unused )
{
        printk (" Time OK !\n");
}
int main(void)
{
    handle_t timer = io_open ("/dev/timer0");  
    timer_set_interval (timer , 1e9 );
    timer_set_on_tick (timer , on_tick , NULL );
    timer_set_enable (timer , true );
        while(1) ;
}
xiangbingj commented 5 years ago

Hello,this bug has already been fixed in bab7cbb. Thank you very much for finding this.