Skip to content

Commit

Permalink
[hal/aic8800] update uart
Browse files Browse the repository at this point in the history
  • Loading branch information
versaloon committed Aug 31, 2023
1 parent 4dcfdf2 commit 59afb97
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
2 changes: 2 additions & 0 deletions source/hal/driver/AIC/AIC8800/device.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@
// uart0 is already used in the library(include interrupt) and debug_uart
#define VSF_HW_USART_COUNT 2
#define VSF_HW_USART_MASK ((1 << 1) | (1 << 2))
#define VSF_HW_USART1_REG AIC_UART1_BASE
#define VSF_HW_USART2_REG AIC_UART2_BASE

#define VSF_HW_I2C_COUNT 1
#define VSF_HW_I2C0_IRQ_IDX I2CM_IRQn
Expand Down
8 changes: 0 additions & 8 deletions source/hal/driver/AIC/AIC8800/uart/i_reg_uart.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,6 @@ extern "C" {
# define __IOM
#endif

#define UART0_BASE_ADDRESS (0x40041000ul)
#define UART1_BASE_ADDRESS (0x40042000ul)
#define UART2_BASE_ADDRESS (0x40043000ul)

#define UART0 ((uart_reg_t *)UART0_BASE_ADDRESS)
#define UART1 ((uart_reg_t *)UART1_BASE_ADDRESS)
#define UART2 ((uart_reg_t *)UART2_BASE_ADDRESS)

#define TXRXD_REG TXRXD.VALUE
#define DIV0_REG DIV0.VALUE
#define IRQCTL_REG IRQCTL.VALUE
Expand Down
2 changes: 1 addition & 1 deletion source/hal/driver/AIC/AIC8800/uart/uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ static void __vsf_hw_usart_irq_handler(vsf_hw_usart_t *hw_usart_ptr)
#define VSF_USART_CFG_IMP_FIFO_TO_REQUEST ENABLED
#define VSF_USART_CFG_IMP_LV0(__COUNT, __HAL_OP) \
static const vsf_hw_usart_const_t __vsf_hw_usart ## __COUNT ## _clock = { \
.reg = UART ## __COUNT, \
.reg = (uart_reg_t *)VSF_HW_USART ## __COUNT ## _REG, \
.irqn = UART ## __COUNT ## _IRQn, \
.hclk = CSC_HCLKME_UART ## __COUNT ## _EN_BIT, \
.oclk = CSC_OCLKME_UART ## __COUNT ## _EN_BIT, \
Expand Down

0 comments on commit 59afb97

Please sign in to comment.