![]() |
BLDC control on ATAVRMC303 with ATxMega128A1
|
#include <ioavr.h>#include <inavr.h>#include <stdint.h>#include "compiler.h"#include "config.h"#include "ushell_task.h"#include "ascii.h"#include "lib_mcu/uart/uart_lib.h"#include "mc_interface.h"

Go to the source code of this file.
Functions | |
| void | BCD_Convert (U8 *data_ptr, U32 number, U8 size) |
| void | SendCommand (U8 *data_ptr, U8 length) |
| void | UpdateScreen (void) |
Variables | |
| static U8 | clearScreen [4] = {27, '[', '2', 'J'} |
| static U8 | Color_b [6] = {27, '[', '3','1','5', 'm'} |
| static U8 | Color_black [6] = {27, '[', '4','0','m'} |
| static U8 | Color_blue [6] = {27, '[', '4','4','m'} |
| static U8 | Color_cyan [6] = {27, '[', '4','6','m'} |
| static U8 | Color_g [6] = {27, '[', '2','1','5', 'm'} |
| static U8 | Color_gb [6] = {27, '[', '6','1','5', 'm'} |
| static U8 | Color_green [6] = {27, '[', '4','2','m'} |
| static U8 | Color_magenta [6] = {27, '[', '4','5','m'} |
| static U8 | Color_r [6] = {27, '[', '1','1','5', 'm'} |
| static U8 | Color_rb [6] = {27, '[', '5','1','5', 'm'} |
| static U8 | Color_red [6] = {27, '[', '4','1','m'} |
| static U8 | Color_rg [6] = {27, '[', '4','1','5', 'm'} |
| static U8 | Color_rgb [6] = {27, '[', '7','1','5', 'm'} |
| static U8 | Color_white [6] = {27, '[', '4','7','m'} |
| static U8 | Color_yellow [6] = {27, '[', '4','3','m'} |
| static U8 | cursorEnd [7] = {27, '[', '8', ';', '2', '1', 'H'} |
| static U8 | cursorHome [3] = {27, '[', 'H'} |
| static U8 | cursorLine [6] = {27, '[', '0', ';', '0', 'H'} |
| static U8 | showPic [6] = {27, '[', '5','0','m'} |
| void BCD_Convert | ( | U8 * | data_ptr, |
| U32 | number, | ||
| U8 | size | ||
| ) |
Function to convert a hexadecimal number to a string.
| data | Pointer to a string to put the digits in, |
| number | A number to convert. |
| size | Max size of the string of numbers. |
Definition at line 62 of file DB101_IF.c.
Referenced by UpdateScreen().
| void SendCommand | ( | U8 * | data_ptr, |
| U8 | length | ||
| ) |
Send a string over USART. Polled version.
| data | Data to send. |
| length | Length of string to send. |
Definition at line 13 of file DB101_IF.c.
Referenced by UpdateScreen().
| void UpdateScreen | ( | void | ) |
Definition at line 22 of file DB101_IF.c.
References BCD_Convert(), clearScreen, cursorEnd, cursorHome, CW, mc_get_potentiometer_value(), mci_direction, mci_get_measured_speed(), mci_run_stop, and SendCommand().
Referenced by main().

|
static |
Definition at line 17 of file DB101_IF.h.
Referenced by UpdateScreen().
|
static |
Definition at line 34 of file DB101_IF.h.
|
static |
Definition at line 23 of file DB101_IF.h.
|
static |
Definition at line 27 of file DB101_IF.h.
|
static |
Definition at line 29 of file DB101_IF.h.
|
static |
Definition at line 33 of file DB101_IF.h.
|
static |
Definition at line 37 of file DB101_IF.h.
|
static |
Definition at line 25 of file DB101_IF.h.
|
static |
Definition at line 28 of file DB101_IF.h.
|
static |
Definition at line 32 of file DB101_IF.h.
|
static |
Definition at line 36 of file DB101_IF.h.
|
static |
Definition at line 24 of file DB101_IF.h.
|
static |
Definition at line 35 of file DB101_IF.h.
|
static |
Definition at line 38 of file DB101_IF.h.
|
static |
Definition at line 30 of file DB101_IF.h.
|
static |
Definition at line 26 of file DB101_IF.h.
|
static |
Definition at line 20 of file DB101_IF.h.
Referenced by UpdateScreen().
|
static |
Definition at line 19 of file DB101_IF.h.
Referenced by UpdateScreen().
|
static |
Definition at line 18 of file DB101_IF.h.
|
static |
Definition at line 21 of file DB101_IF.h.