#include <stdint.h>
#include "btstack_config.h"
Functions | |
void | delay_check (uint32_t value) |
void | hal_uart_dma_init (void) |
Init and open device. More... | |
void | hal_uart_dma_receive_block (uint8_t *buffer, uint16_t len) |
Receive block. More... | |
void | hal_uart_dma_send_block (const uint8_t *buffer, uint16_t length) |
Send block. More... | |
int | hal_uart_dma_set_baud (uint32_t baud) |
Set baud rate. More... | |
void | hal_uart_dma_set_block_received (void(*callback)(void)) |
Set callback for block received - can be called from ISR context. More... | |
void | hal_uart_dma_set_block_sent (void(*callback)(void)) |
Set callback for block sent - can be called from ISR context. More... | |
void | hal_uart_dma_set_csr_irq_handler (void(*csr_irq_handler)(void)) |
Set or clear callback for CSR pulse - can be called from ISR context. More... | |
void | hal_uart_dma_set_sleep (uint8_t sleep) |
Set sleep mode. More... | |
void delay_check | ( | uint32_t | value | ) |
References vTaskDelay().
void hal_uart_dma_init | ( | void | ) |
Init and open device.
References ALL_INTERRUPT_MASK, DEBUG_PIN_1, DEBUG_PIN_2, hal_uart_dma_initialized, IOPORT_DIR_OUTPUT, IOPORT_PIN_LEVEL_HIGH, IOPORT_PIN_LEVEL_LOW, ioport_set_pin_dir(), ioport_set_pin_level(), log_info, simulate_flowcontrol, sysclk_enable_peripheral_clock(), sysclk_get_peripheral_hz(), usart_disable_interrupt(), usart_enable_rx(), usart_enable_tx(), usart_init_rs232(), and vTaskDelay().
Referenced by btstack_uart_block_freertos_open().
void hal_uart_dma_receive_block | ( | uint8_t * | buffer, |
uint16_t | len | ||
) |
Receive block.
When done, callback set by hal_uart_dma_set_block_received must be called
buffer | |
lengh |
References bytes_to_read, hal_uart_rts_low(), rx_buffer_ptr, rx_notify, and usart_enable_interrupt().
void hal_uart_dma_send_block | ( | const uint8_t * | buffer, |
uint16_t | length | ||
) |
Send block.
When done, callback set by hal_uart_set_block_sent must be called
buffer | |
lengh |
References bytes_to_write, log_error, tx_buffer_ptr, tx_notify, and usart_enable_interrupt().
int hal_uart_dma_set_baud | ( | uint32_t | baud | ) |
Set baud rate.
baudrate |
References log_error, sysclk_get_peripheral_hz(), usart_disable_rx(), usart_disable_tx(), usart_enable_rx(), usart_enable_tx(), and usart_set_async_baudrate().
Referenced by btstack_uart_block_freertos_open().
void hal_uart_dma_set_block_received | ( | void(*)(void) | callback | ) |
Set callback for block received - can be called from ISR context.
callback |
References rx_done_handler.
Referenced by btstack_uart_block_freertos_init().
void hal_uart_dma_set_block_sent | ( | void(*)(void) | callback | ) |
Set callback for block sent - can be called from ISR context.
callback |
References tx_done_handler.
Referenced by btstack_uart_block_freertos_init().
void hal_uart_dma_set_csr_irq_handler | ( | void(*)(void) | csr_irq_handler | ) |
Set or clear callback for CSR pulse - can be called from ISR context.
csr_irq_handler | or NULL to disable IRQ handler |
References cts_irq_handler.
void hal_uart_dma_set_sleep | ( | uint8_t | sleep | ) |
Set sleep mode.
block_received | callback |