diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-07-11 20:58:47 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-07-11 20:58:47 +0000 |
commit | 25694ca4c649d667e7baa519434fae2d885cc6b7 (patch) | |
tree | 41ff71b33ef6b9657e32e87098e4301a730672c8 /nuttx/arch/arm/src/lpc43xx/lpc43_uart.h | |
parent | bf7b0b10ec01c1272c4007f90866b03bd8aff054 (diff) | |
download | px4-nuttx-25694ca4c649d667e7baa519434fae2d885cc6b7.tar.gz px4-nuttx-25694ca4c649d667e7baa519434fae2d885cc6b7.tar.bz2 px4-nuttx-25694ca4c649d667e7baa519434fae2d885cc6b7.zip |
LPC43 Need to use fractional dividers to get the low-level UART BAUD correct
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4931 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/arm/src/lpc43xx/lpc43_uart.h')
-rw-r--r-- | nuttx/arch/arm/src/lpc43xx/lpc43_uart.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/nuttx/arch/arm/src/lpc43xx/lpc43_uart.h b/nuttx/arch/arm/src/lpc43xx/lpc43_uart.h index 1eeafc20b..90216ff64 100644 --- a/nuttx/arch/arm/src/lpc43xx/lpc43_uart.h +++ b/nuttx/arch/arm/src/lpc43xx/lpc43_uart.h @@ -133,6 +133,20 @@ EXTERN void lpc43_usart2_setup(void); EXTERN void lpc43_usart3_setup(void); #endif +/**************************************************************************** + * Name: lpc43_setbaud + * + * Description: + * Configure the U[S]ART divisors to accomplish the desired BAUD given the + * U[S]ART base frequency. + * + * This computationally intensive algorithm is based on the same logic + * used in the NXP sample code. + * + ****************************************************************************/ + +EXTERN void lpc43_setbaud(uintptr_t uartbase, uint32_t basefreq, uint32_t baud); + #undef EXTERN #if defined(__cplusplus) } |