![]() |
BLDC control on ATAVRMC303 with ATxMega128A1
|
,v More...
#include "config.h"#include "mc_interface.h"#include "mc_control.h"#include "mc_drv.h"#include "DB101_IF.h"#include "adc_drv.h"#include "uart\uart_lib.h"#include "ushell_task.h"#include "clksys_driver.h"
Go to the source code of this file.
Functions | |
| void | clock_init (void) |
| int | main (void) |
| Main Entry. More... | |
Variables | |
| U16 | g_regulation_period = 0 |
| Define the sampling period. More... | |
| Bool | g_tick |
| Use for control the sampling period value. More... | |
| U16 | motor_speed = 0 |
| User Speed Order. More... | |
,v
Copyright (c) 2008 Atmel.
Main module : It is based on an infinite loop
Definition in file main.c.
| void clock_init | ( | void | ) |
Definition at line 34 of file main.c.
References CLKSYS_Enable, CLKSYS_IsReady, CLKSYS_Main_ClockSource_Select(), CLKSYS_PLL_Config(), and CLKSYS_Prescalers_Config().
Referenced by main().

| int main | ( | void | ) |
Main Entry.
The main entry point for the control motor application.
The mc_regulation_loop() function is launched every 80ms.
Definition at line 53 of file main.c.
References clock_init(), g_regulation_period, g_tick, mc_ADC_Scheduler(), mc_get_potentiometer_value(), mc_init(), mc_inrush_task(), mc_regulation_loop(), mci_run(), mci_set_motor_speed(), UpdateScreen(), ushell_active, ushell_task(), and ushell_task_init().

| U16 g_regulation_period = 0 |
| Bool g_tick |
Use for control the sampling period value.
Definition at line 39 of file mc_drv.c.
Referenced by launch_sampling_period(), and main().