/* Reflow Oven Controller * * Copyright (C) 2021 Mario Hüttel * * This file is part of the Reflow Oven Controller Project. * * The reflow oven controller is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * The Reflow Oven Control Firmware is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with the reflow oven controller project. * If not, see . */ #ifndef __SHELL_UART_H__ #include #include #include /** * @brief Configure the UART for the shellmatta shell. * * This will configure the UART for use with a DMA ring buffer. * @param uart */ void shell_uart_setup(void); shellmatta_retCode_t shell_uart_write_callback(const char *data, uint32_t len); int shell_uart_receive_data_with_dma(const char **data, size_t *len); /** * @brief Configure a new connection speed. * @param new_baud Baudrate. E.g: 115200 * @return Error in permille (1/1000). A return value of 2 means a baudrate error of: 0.002 or 0.2%. * Return value is negative in case of a hard error. */ int32_t shell_uart_reconfig_baud(uint32_t new_baud); uint32_t shell_uart_get_current_baudrate(void); #define __SHELL_UART_H__ #endif /* __SHELL_UART_H__ */