Files
wordclock/code/main/hal/inc/uart.h
T
Matthias Mitscherlich a0d13f08c1 Started with a blank main file
- Added GPIO handling
- Added a logger class with additional static debug log handling

Tested, functional
2024-03-11 15:45:48 +01:00

92 lines
3.2 KiB
C++

// --------------------------------------------------------------------------------------------------------------------
/// \file uart.h
/// \brief File description
// --------------------------------------------------------------------------------------------------------------------
//
// vbchaos software design
//
// --------------------------------------------------------------------------------------------------------------------
/// $Revision: $
/// $Author: $
/// $Date: $
// (c) 2023 vbchaos
// --------------------------------------------------------------------------------------------------------------------
#ifndef MAIN_HAL_INC_UART_H_
#define MAIN_HAL_INC_UART_H_
/**
* uart implementation
* \defgroup uart
* \brief {group_description}
* \addtogroup {Layer}
*
* Detailed description
* @{
*/
// --------------------------------------------------------------------------------------------------------------------
// Include files
// --------------------------------------------------------------------------------------------------------------------
// CompilerIncludes
// All include files that are provided by the compiler directly
#include <stdint.h>
// ProjectIncludes
// All include files that are provided by the project
#include "ISerialBus.h"
#include "driver/uart.h"
// --------------------------------------------------------------------------------------------------------------------
// Constant and macro definitions
// --------------------------------------------------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------
// Type definitions.
// --------------------------------------------------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------
// Function declarations
// --------------------------------------------------------------------------------------------------------------------
class uart : public ISerialBus<uint8_t>
{
// -----------------------------------------------------------------------------------------------------------------
// Public Section
// -----------------------------------------------------------------------------------------------------------------
public:
// Class Constructor
uart(uart_port_t* uartPort);
~uart();
FunctionStatus read(uint8_t* buffer, uint32_t length, uint32_t* actualLength);
FunctionStatus write(uint8_t* buffer, uint32_t length);
// -----------------------------------------------------------------------------------------------------------------
// Protected Section
// -----------------------------------------------------------------------------------------------------------------
protected:
// -----------------------------------------------------------------------------------------------------------------
// Private Section
// -----------------------------------------------------------------------------------------------------------------
private:
uart_port_t* port;
};
/** @} */
#endif /* MAIN_HAL_INC_UART_H_ */