cpu/sam0-stm32/uart: rename tx buf size to UART_TXBUF_SIZE
This commit is contained in:
parent
dd331c91d3
commit
0b8adb2d27
@ -192,8 +192,8 @@ typedef enum {
|
|||||||
/**
|
/**
|
||||||
* @brief Size of the UART TX buffer for non-blocking mode.
|
* @brief Size of the UART TX buffer for non-blocking mode.
|
||||||
*/
|
*/
|
||||||
#ifndef SAM0_UART_TXBUF_SIZE
|
#ifndef UART_TXBUF_SIZE
|
||||||
#define SAM0_UART_TXBUF_SIZE (64)
|
#define UART_TXBUF_SIZE (64)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -41,7 +41,7 @@
|
|||||||
#ifdef MODULE_PERIPH_UART_NONBLOCKING
|
#ifdef MODULE_PERIPH_UART_NONBLOCKING
|
||||||
#include "tsrb.h"
|
#include "tsrb.h"
|
||||||
static tsrb_t uart_tx_rb[UART_NUMOF];
|
static tsrb_t uart_tx_rb[UART_NUMOF];
|
||||||
static uint8_t uart_tx_rb_buf[UART_NUMOF][SAM0_UART_TXBUF_SIZE];
|
static uint8_t uart_tx_rb_buf[UART_NUMOF][UART_TXBUF_SIZE];
|
||||||
#endif
|
#endif
|
||||||
static uart_isr_ctx_t uart_ctx[UART_NUMOF];
|
static uart_isr_ctx_t uart_ctx[UART_NUMOF];
|
||||||
|
|
||||||
@ -68,7 +68,7 @@ int uart_init(uart_t uart, uint32_t baudrate, uart_rx_cb_t rx_cb, void *arg)
|
|||||||
|
|
||||||
#ifdef MODULE_PERIPH_UART_NONBLOCKING
|
#ifdef MODULE_PERIPH_UART_NONBLOCKING
|
||||||
/* set up the TX buffer */
|
/* set up the TX buffer */
|
||||||
tsrb_init(&uart_tx_rb[uart], uart_tx_rb_buf[uart], SAM0_UART_TXBUF_SIZE);
|
tsrb_init(&uart_tx_rb[uart], uart_tx_rb_buf[uart], UART_TXBUF_SIZE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* configure pins */
|
/* configure pins */
|
||||||
|
|||||||
@ -550,8 +550,8 @@ typedef enum {
|
|||||||
/**
|
/**
|
||||||
* @brief Size of the UART TX buffer for non-blocking mode.
|
* @brief Size of the UART TX buffer for non-blocking mode.
|
||||||
*/
|
*/
|
||||||
#ifndef STM32_UART_TXBUF_SIZE
|
#ifndef UART_TXBUF_SIZE
|
||||||
#define STM32_UART_TXBUF_SIZE (64)
|
#define UART_TXBUF_SIZE (64)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef DOXYGEN
|
#ifndef DOXYGEN
|
||||||
|
|||||||
@ -61,7 +61,7 @@
|
|||||||
* @brief Allocate for tx ring buffers
|
* @brief Allocate for tx ring buffers
|
||||||
*/
|
*/
|
||||||
static tsrb_t uart_tx_rb[UART_NUMOF];
|
static tsrb_t uart_tx_rb[UART_NUMOF];
|
||||||
static uint8_t uart_tx_rb_buf[UART_NUMOF][STM32_UART_TXBUF_SIZE];
|
static uint8_t uart_tx_rb_buf[UART_NUMOF][UART_TXBUF_SIZE];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -168,7 +168,7 @@ int uart_init(uart_t uart, uint32_t baudrate, uart_rx_cb_t rx_cb, void *arg)
|
|||||||
|
|
||||||
#ifdef MODULE_PERIPH_UART_NONBLOCKING
|
#ifdef MODULE_PERIPH_UART_NONBLOCKING
|
||||||
/* set up the TX buffer */
|
/* set up the TX buffer */
|
||||||
tsrb_init(&uart_tx_rb[uart], uart_tx_rb_buf[uart], STM32_UART_TXBUF_SIZE);
|
tsrb_init(&uart_tx_rb[uart], uart_tx_rb_buf[uart], UART_TXBUF_SIZE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
uart_init_pins(uart, rx_cb);
|
uart_init_pins(uart, rx_cb);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user