/*! * @defgroup LD19 * @brief Asynchronous serial communication to LiDAR Sensor LD19 distance sensor
LiDAR Sensor LD19 distance sensor interface
Pin LD19 MSPM0
1 Tx PB13 RxD: is UART3 Rx (LD19 to MSPM0)
2 PWM PB12 GPIO write a 0 to run fastest (MSPM0 to LD19)
3 GND ground
4 P5V 5V
* @{*/ /** * @file LD19.h * @brief Initialize LD19, interrupt synchronization * @details LD19 initialization. UART3 230400 bps baud, * 1 start, 8 data bits, 1 stop, no parity.
* @version RTOS * @author Jonathan Valvano * @copyright Valvano 2025 * @warning AS-IS * @note For more information see http://users.ece.utexas.edu/~valvano/ * @date Nov 5, 2025
LiDAR Sensor LD19 distance sensor interface
Pin LD19 MSPM0
1 Tx PB13 RxD: is UART3 Rx (LD19 to MSPM0)
2 PWM PB12 GPIO write a 0 to run fastest (MSPM0 to LD19)
3 GND ground
4 P5V 5V
UART3 is shared between LD19 and TFLuna3 (can have either but not both) ******************************************************************************/ #ifndef __LD19_H__ #define __LD19_H__ /** * initializeLiDAR Sensor LD19 distance sensor 230400 bps baud rate.
* interrupt synchronization * @param d 0 for debug, pointer to array of 540 elements for read time * @return none * @brief Initialize LD19 */ void LD19_Init(uint16_t *d); // the following functions only needed for low-level debugging /** * Wait for new serial port input
* Uses interrupt synchronization
* This function waits if the receive software FIFO is empty * @param Input: none * @return 8-bit code from TF Luna */ uint8_t LD19_InChar(void); /** * Returns how much data available for reading * @param none * @return number of elements in receive software FIFO */ uint32_t LD19_InStatus(void); #endif // __LD19_H__ /** @}*/