aboutsummaryrefslogtreecommitdiffstats
path: root/wirish/comm/HardwareSerial.h
diff options
context:
space:
mode:
Diffstat (limited to 'wirish/comm/HardwareSerial.h')
-rw-r--r--wirish/comm/HardwareSerial.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/wirish/comm/HardwareSerial.h b/wirish/comm/HardwareSerial.h
index 17be49f..aad8aa7 100644
--- a/wirish/comm/HardwareSerial.h
+++ b/wirish/comm/HardwareSerial.h
@@ -31,8 +31,17 @@
#ifndef _HARDWARESERIAL_H_
#define _HARDWARESERIAL_H_
+#include "timers.h"
+
#include "Print.h"
+/* NB: this class documented "by hand" (i.e., not using Doxygen) in:
+
+ libmaple/docs/source/lang/serial.rst
+
+ If you alter the public HardwareSerial interface, you must update
+ the documentation accordingly. */
+
class HardwareSerial : public Print {
private:
uint8 usart_num;
@@ -40,7 +49,7 @@ class HardwareSerial : public Print {
GPIO_Port *gpio_port;
uint8 tx_pin;
uint8 rx_pin;
- uint8 timer_num;
+ timer_dev_num timer_num;
uint8 compare_num;
public:
HardwareSerial(uint8 usart_num,
@@ -48,9 +57,9 @@ class HardwareSerial : public Print {
GPIO_Port *gpio_port,
uint8 tx_pin,
uint8 rx_pin,
- uint8 timer_num,
+ timer_dev_num timer_num,
uint8 compare_num);
- void begin(uint32);
+ void begin(uint32 baud);
void end(void);
uint32 available(void);
uint8 read(void);