STM32 firmware for a remotely-controlled stepper motor demo with a mobile interface.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
f105-motor-demo_stm32/project/com/iface_usart.h

19 lines
565 B

#pragma once
#include "main.h"
#include "com_iface.h"
// Hardware USART.
/**
* @brief Init an USART interface. Caller must configure GPIO's & AF manually.
* @param USARTx device
* @param baud baud rate (ex.: 9600)
* @param rxbuf_len receive buffer size, must be > 0
* @param txbuf_len send buffer size. If 0, tx is blocking.
* @return the iface structure
*/
ComIface *usart_iface_init(USART_TypeDef* USARTx, uint32_t baud, size_t rxbuf_len, size_t txbuf_len);
///** Set baud rate */
//void usart_iface_set_baudrate(ComIface *iface, uint32_t baud);