| 123456789101112131415161718192021222324252627 |
- #include "app/app.h"
- #include "bsp/bsp.h"
- #include "os/timer.h"
- #include "os/co_task.h"
- #include "libs/logger.h"
- #include "prot/can_message.h"
- #include "foc/foc_api.h"
- static void _app_low_task(void *args);
- void app_start(void){
- set_log_level(MOD_SYSTEM, L_debug);
- can_message_init();
- foc_init();
- co_task_create(_app_low_task, NULL, 512);
- co_task_schedule();
- }
- static void _app_low_task(void *args) {
- while(1) {
- wdog_reload();
- sys_debug("speed %d RPM\n", foc_get_speed());
- co_task_delay(500);
- }
- }
|