diff options
author | Nao Pross <naopross@thearcway.org> | 2018-05-04 01:39:50 +0200 |
---|---|---|
committer | Nao Pross <naopross@thearcway.org> | 2018-05-04 01:39:50 +0200 |
commit | 51a827c0c9f45683228177b8ac7ffe140613e982 (patch) | |
tree | b419b626b076e007240a1abe16900a7ecb310fe3 /hal/uart.hpp | |
parent | Update pin class to support input and output mode (diff) | |
download | SAMLiquidSmoke-51a827c0c9f45683228177b8ac7ffe140613e982.tar.gz SAMLiquidSmoke-51a827c0c9f45683228177b8ac7ffe140613e982.zip |
Fix indent, replace tabs with spaces
Diffstat (limited to '')
-rw-r--r-- | hal/uart.hpp | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/hal/uart.hpp b/hal/uart.hpp index 179dd4a..461f0fa 100644 --- a/hal/uart.hpp +++ b/hal/uart.hpp @@ -6,7 +6,7 @@ */ #ifndef UART_HPP -#define UART_HPP +#define UART_HPP #include <cstdint> #include <cstddef> @@ -21,33 +21,33 @@ void usart_4_isr(); namespace uart { - const unsigned devices_count = 4; - - enum class status : unsigned int - { - rx_data_available = 1<<0, - rx_overrun_error = 1<<1, - framing_error = 1<<2, - parity_error = 1<<3, - receiver_ide = 1<<4, - tx_complete = 1<<8, - tx_full = 1<<9, - }; - - enum class transfer_status : unsigned int - { - rx_full = 1<<0, - rx_data_present = 1<<1, - rx_empty = 1<<2, - tx_full = 1<<3, - tx_empty = 1<<4, - }; - - std::string rx_buffer[devices_count]; - std::string tx_buffer[devices_count]; - - template<unsigned dev> - void initialize(); + const unsigned devices_count = 4; + + enum class status : unsigned int + { + rx_data_available = 1<<0, + rx_overrun_error = 1<<1, + framing_error = 1<<2, + parity_error = 1<<3, + receiver_ide = 1<<4, + tx_complete = 1<<8, + tx_full = 1<<9, + }; + + enum class transfer_status : unsigned int + { + rx_full = 1<<0, + rx_data_present = 1<<1, + rx_empty = 1<<2, + tx_full = 1<<3, + tx_empty = 1<<4, + }; + + std::string rx_buffer[devices_count]; + std::string tx_buffer[devices_count]; + + template<unsigned dev> + void initialize(); template<unsigned dev> uint8_t peek(uint16_t offset); @@ -83,5 +83,5 @@ namespace uart bool tx_buffer_full(); } -#endif /* UART_HPP */ +#endif /* UART_HPP */ |