|
|
|
|
|
|
|
|
class HardwareSerial : public Stream |
|
|
class HardwareSerial : public Stream |
|
|
{ |
|
|
{ |
|
|
public: |
|
|
public: |
|
|
|
|
|
constexpr HardwareSerial() {} |
|
|
virtual void begin(uint32_t baud) { serial_begin(BAUD2DIV(baud)); } |
|
|
virtual void begin(uint32_t baud) { serial_begin(BAUD2DIV(baud)); } |
|
|
virtual void begin(uint32_t baud, uint32_t format) { |
|
|
virtual void begin(uint32_t baud, uint32_t format) { |
|
|
serial_begin(BAUD2DIV(baud)); |
|
|
serial_begin(BAUD2DIV(baud)); |
|
|
|
|
|
|
|
|
class HardwareSerial2 : public HardwareSerial |
|
|
class HardwareSerial2 : public HardwareSerial |
|
|
{ |
|
|
{ |
|
|
public: |
|
|
public: |
|
|
|
|
|
constexpr HardwareSerial2() {} |
|
|
virtual void begin(uint32_t baud) { serial2_begin(BAUD2DIV2(baud)); } |
|
|
virtual void begin(uint32_t baud) { serial2_begin(BAUD2DIV2(baud)); } |
|
|
virtual void begin(uint32_t baud, uint32_t format) { |
|
|
virtual void begin(uint32_t baud, uint32_t format) { |
|
|
serial2_begin(BAUD2DIV2(baud)); |
|
|
serial2_begin(BAUD2DIV2(baud)); |
|
|
|
|
|
|
|
|
class HardwareSerial3 : public HardwareSerial |
|
|
class HardwareSerial3 : public HardwareSerial |
|
|
{ |
|
|
{ |
|
|
public: |
|
|
public: |
|
|
|
|
|
constexpr HardwareSerial3() {} |
|
|
virtual void begin(uint32_t baud) { serial3_begin(BAUD2DIV3(baud)); } |
|
|
virtual void begin(uint32_t baud) { serial3_begin(BAUD2DIV3(baud)); } |
|
|
virtual void begin(uint32_t baud, uint32_t format) { |
|
|
virtual void begin(uint32_t baud, uint32_t format) { |
|
|
serial3_begin(BAUD2DIV3(baud)); |
|
|
serial3_begin(BAUD2DIV3(baud)); |
|
|
|
|
|
|
|
|
class HardwareSerial4 : public HardwareSerial |
|
|
class HardwareSerial4 : public HardwareSerial |
|
|
{ |
|
|
{ |
|
|
public: |
|
|
public: |
|
|
|
|
|
constexpr HardwareSerial4() {} |
|
|
virtual void begin(uint32_t baud) { serial4_begin(BAUD2DIV3(baud)); } |
|
|
virtual void begin(uint32_t baud) { serial4_begin(BAUD2DIV3(baud)); } |
|
|
virtual void begin(uint32_t baud, uint32_t format) { |
|
|
virtual void begin(uint32_t baud, uint32_t format) { |
|
|
serial4_begin(BAUD2DIV3(baud)); |
|
|
serial4_begin(BAUD2DIV3(baud)); |
|
|
|
|
|
|
|
|
class HardwareSerial5 : public HardwareSerial |
|
|
class HardwareSerial5 : public HardwareSerial |
|
|
{ |
|
|
{ |
|
|
public: |
|
|
public: |
|
|
|
|
|
constexpr HardwareSerial5() {} |
|
|
virtual void begin(uint32_t baud) { serial5_begin(BAUD2DIV3(baud)); } |
|
|
virtual void begin(uint32_t baud) { serial5_begin(BAUD2DIV3(baud)); } |
|
|
virtual void begin(uint32_t baud, uint32_t format) { |
|
|
virtual void begin(uint32_t baud, uint32_t format) { |
|
|
serial5_begin(BAUD2DIV3(baud)); |
|
|
serial5_begin(BAUD2DIV3(baud)); |
|
|
|
|
|
|
|
|
class HardwareSerial6 : public HardwareSerial |
|
|
class HardwareSerial6 : public HardwareSerial |
|
|
{ |
|
|
{ |
|
|
public: |
|
|
public: |
|
|
|
|
|
constexpr HardwareSerial6() {} |
|
|
#if defined(__MK66FX1M0__) // For LPUART just pass baud straight in. |
|
|
#if defined(__MK66FX1M0__) // For LPUART just pass baud straight in. |
|
|
virtual void begin(uint32_t baud) { serial6_begin(baud); } |
|
|
virtual void begin(uint32_t baud) { serial6_begin(baud); } |
|
|
virtual void begin(uint32_t baud, uint32_t format) { |
|
|
virtual void begin(uint32_t baud, uint32_t format) { |