Paparazzi UAS
v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
|
linux uart handling More...
#include <BOARD_CONFIG>
#include "mcu_periph/uart.h"
#include <stdint.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include "serial_port.h"
#include "rt_priority.h"
#include <pthread.h>
#include <sys/select.h>
Go to the source code of this file.
Macros | |
#define | UART_THREAD_PRIO 11 |
#define | TRACE(fmt, args...) fprintf(stderr, fmt, args) |
Functions | |
static void | uart_receive_handler (struct uart_periph *periph) |
static void * | uart_thread (void *data) |
void | uart_arch_init (void) |
void | uart_periph_set_baudrate (struct uart_periph *periph, uint32_t baud) |
void | uart_put_byte (struct uart_periph *periph, uint8_t data) |
uint8_t | uart_getch (struct uart_periph *p) |
uint16_t | uart_char_available (struct uart_periph *p) |
Check UART for available chars in receive buffer. More... | |
Variables | |
static pthread_mutex_t | uart_mutex = PTHREAD_MUTEX_INITIALIZER |
linux uart handling
Definition in file uart_arch.c.
#define TRACE | ( | fmt, | |
args... | |||
) | fprintf(stderr, fmt, args) |
Definition at line 51 of file uart_arch.c.
Referenced by uart_periph_set_baudrate(), uart_put_byte(), and uart_receive_handler().
#define UART_THREAD_PRIO 11 |
Definition at line 44 of file uart_arch.c.
Referenced by uart_thread().
void uart_arch_init | ( | void | ) |
Definition at line 54 of file uart_arch.c.
Referenced by mcu_init().
uint16_t uart_char_available | ( | struct uart_periph * | p | ) |
Check UART for available chars in receive buffer.
Definition at line 296 of file uart_arch.c.
Referenced by gps_piksi_event(), gps_piksi_read(), high_speed_logger_direct_memory_periodic(), hott_check_serial_data(), hott_send_telemetry_data(), imu_um6_event(), ImuEvent(), ReadGX3Buffer(), sbus_common_decode_event(), tunnel_event(), vn200_event(), and vn200_read_buffer().
uint8_t uart_getch | ( | struct uart_periph * | p | ) |
Definition at line 287 of file uart_arch.c.
Referenced by gps_piksi_read(), high_speed_logger_direct_memory_periodic(), hott_check_serial_data(), hott_send_telemetry_data(), imu_um6_event(), ReadGX3Buffer(), sbus_common_decode_event(), tunnel_event(), and vn200_read_buffer().
void uart_periph_set_baudrate | ( | struct uart_periph * | periph, |
uint32_t | baud | ||
) |
Definition at line 216 of file uart_arch.c.
Referenced by gps_ubx_ucenter_autobaud(), gps_ubx_ucenter_configure(), sbus_common_init(), and xbee_init().
void uart_put_byte | ( | struct uart_periph * | periph, |
uint8_t | data | ||
) |
Definition at line 243 of file uart_arch.c.
Referenced by ahrs_gx3_align(), direct_memory_logger_periodic(), drop_ball(), gps_piksi_write(), hott_send_telemetry_data(), imu_impl_init(), sdlogger_spi_direct_periodic(), send_buffer_to_uart(), tunnel_event(), uart_periph_init(), and UM6_send_packet().
|
static |
Definition at line 261 of file uart_arch.c.
References fd, SerialPort::fd, TRACE, and UART_RX_BUFFER_SIZE.
Referenced by uart_thread().
|
static |
Definition at line 65 of file uart_arch.c.
References fd, get_rt_prio(), uart_receive_handler(), and UART_THREAD_PRIO.
Referenced by uart_arch_init().
|
static |
Definition at line 49 of file uart_arch.c.