![]() |
miniFOC 1.0.3
This open-source project aims to accomplish a FOC(Field Oriented Control) scheme that is operatable with minimum costs in China.
|
this is the header file of uart.c. More...
Go to the source code of this file.
Macros | |
#define | uart_sendbyte(x) |
UART send single byte macro. More... | |
Functions | |
void | uart_config (void) |
configure uart0 periph and its gpios More... | |
void | mdtp_data_transmit (unsigned char pid, const unsigned char *buffer) |
medium capacity data transmission protocol packing function More... | |
void | mdtp_receive_handler (unsigned char data) |
medium capacity data transmission protocol unpacking handler More... | |
void | mdtp_callback_handler (unsigned char pid, const unsigned char *data) |
user callback function for unpacking completion of medium capacity transport protocol More... | |
#define uart_sendbyte | ( | x | ) |
void mdtp_callback_handler | ( | unsigned char | pid, |
const unsigned char * | data | ||
) |
user callback function for unpacking completion of medium capacity transport protocol
[in] | pid | medium capacity transport protocol package id |
[in] | data | received data array of size 8 bytes |
Definition at line 28 of file main.c.
References ANGLE_LOOP_CONTROL, angle_pid_handler, PID_Structure_t::expect, foc_parameter_available_flag, FOC_Struct, int32_to_float(), PID_Structure_t::kd, PID_Structure_t::ki, PID_Structure_t::kp, minifoc_fsm_state, pid_config(), pid_control_mode_flag, pid_parameter_available_flag, SPEED_LOOP_CONTROL, speed_pid_handler, PID_Structure_t::sum_maximum, TORQUE_LOOP_CONTROL, and FOC_Structure_t::user_expect.
Referenced by mdtp_receive_handler().
void mdtp_data_transmit | ( | unsigned char | pid, |
const unsigned char * | buffer | ||
) |
medium capacity data transmission protocol packing function
[in] | pid | medium capacity transport protocol package id |
[in] | buffer | transmit data array of size 8 bytes |
Definition at line 113 of file uart.c.
References uart_sendbyte.
Referenced by report_angle_speed(), and report_local_variable().
void mdtp_receive_handler | ( | unsigned char | data | ) |
medium capacity data transmission protocol unpacking handler
[in] | data | data received from UART peripheral |
Definition at line 36 of file uart.c.
References mdtp_callback_handler(), mdtp_receive_data_buffer, mdtp_receive_number_counter, mdtp_receive_status, and user_memset().
Referenced by USART0_IRQHandler().
void uart_config | ( | void | ) |
configure uart0 periph and its gpios
Definition at line 143 of file uart.c.
References UART_BAUDRATE, and UART_PRIORITY.
Referenced by main().