[328p] This is used to avoid path resolving issues and defines the common known Arduino SoftwareSerial interface only enabled on UNO and NANO (specific, ATmega328P based-plattforms)
Don't use manually
More...
#include <eagle_SoftwareSerial.h>
Inherits Stream.
|
void | recv (void) |
| private receive routine called each time interrupt handler gets triggered More...
|
|
uint8_t | rx_pin_read (void) |
| simple routine to read the rxPin by registers More...
|
|
void | tx_pin_write (uint8_t pin_state) |
| writes a bool value on the txPin by registers More...
|
|
void | setTX (uint8_t transmitPin) |
| sets a specific pin to be 'the chosen one' as a txPin More...
|
|
void | setRX (uint8_t receivePin) |
| sets a specific pin to be 'the chosen one' as a rxPin More...
|
|
|
static void | tunedDelay (uint16_t delay) |
| apply a specific delay to achieve higher precision More...
|
|
[328p] This is used to avoid path resolving issues and defines the common known Arduino SoftwareSerial interface only enabled on UNO and NANO (specific, ATmega328P based-plattforms)
Don't use manually
This class was known as NewSoftSerial and renamend to SoftwareSerial for consistent naming
- Authors
- arduiniana (core)
-
ladyada
-
Mikel Hart
-
Paul Stoffregen
-
Garrett Mace
-
Brett Hagman
- Copyright
- 2006 GNU Lesser General Public License 2.1 as published by the Free Software Foundation
- Note
- this code was documented and modified by EagleoutIce in 2018 for custom use! [Kept _DEBUG functionality]
Definition at line 47 of file eagle_SoftwareSerial.h.
◆ SoftwareSerial() [1/2]
eagle_impl::SoftwareSerial::SoftwareSerial |
( |
uint8_t |
receivePin, |
|
|
uint8_t |
transmitPin, |
|
|
bool |
inverse_logic = false |
|
) |
| |
the constructor for the SoftwareSerial object
- Parameters
-
receivePin | the destined rx Pin |
transmitPin | the destined tx Pin |
inverse_logic | true if you wan't to have no pullups and inverted com logic |
◆ SoftwareSerial() [2/2]
eagle_impl::SoftwareSerial::SoftwareSerial |
( |
void |
| ) |
|
◆ ~SoftwareSerial()
eagle_impl::SoftwareSerial::~SoftwareSerial |
( |
void |
| ) |
|
◆ available()
virtual int eagle_impl::SoftwareSerial::available |
( |
void |
| ) |
|
|
virtual |
checks if there is data to read available
- Returns
- 0 if there's no Data available or the device isn't listening
◆ begin()
void eagle_impl::SoftwareSerial::begin |
( |
long |
speed | ) |
|
the start function to setup delay_values etc.
- Parameters
-
speed | the communcation should work at
possible values:
- 300 (baud)
- 1200 (baud)
- 2400 (baud)
- 4800 (baud)
- 9600 (baud) [common]
- 14400 (baud)
- 19200 (baud)
- 28800 (baud)
- 38400 (baud)
- 57600 (baud)
- 115200 (baud)
|
◆ configure()
void eagle_impl::SoftwareSerial::configure |
( |
uint8_t |
receivePin, |
|
|
uint8_t |
transmitPin, |
|
|
bool |
inverse_logic = false |
|
) |
| |
this allows eBoard to configure the object
- Parameters
-
receivePin | the destined rx Pin |
transmitPin | the destined tx Pin |
inverse_logic | true if you wan't to have no pullups and inverted com logic |
◆ end()
void eagle_impl::SoftwareSerial::end |
( |
void |
| ) |
|
|
inline |
ends communcation on the rx pin
◆ flush()
virtual void eagle_impl::SoftwareSerial::flush |
( |
void |
| ) |
|
|
virtual |
resets the position in buffer and the buffer itself if the object is listening
◆ handle_interrupt()
static void eagle_impl::SoftwareSerial::handle_interrupt |
( |
void |
| ) |
|
|
inlinestatic |
used to handle interrupts on active listening object
◆ isListening()
bool eagle_impl::SoftwareSerial::isListening |
( |
void |
| ) |
|
|
inline |
checks if this object is the listening object
- Returns
- true if the object is the listening object
◆ listen()
bool eagle_impl::SoftwareSerial::listen |
( |
void |
| ) |
|
sets the SoftwareSerial object to be the listening one gaining control over the buffers etc.
- Returns
- true if it replaces another object (can be no object)
◆ overflow()
bool eagle_impl::SoftwareSerial::overflow |
( |
void |
| ) |
|
|
inline |
returns the current overflow flag and disables it
- Returns
- the current overflow flag
◆ peek()
int eagle_impl::SoftwareSerial::peek |
( |
void |
| ) |
|
reads the actual pointed rxBuffer element without dropping it
- Returns
- the read value (-1 if fails)
◆ read()
virtual int eagle_impl::SoftwareSerial::read |
( |
void |
| ) |
|
|
virtual |
reads the actual pointed rxBuffer top element
- Returns
- the read value (-1 if fails)
◆ recv()
void eagle_impl::SoftwareSerial::recv |
( |
void |
| ) |
|
|
private |
private receive routine called each time interrupt handler gets triggered
◆ rx_pin_read()
uint8_t eagle_impl::SoftwareSerial::rx_pin_read |
( |
void |
| ) |
|
|
inlineprivate |
simple routine to read the rxPin by registers
- Returns
- the (bool) value on current pin
◆ setRX()
void eagle_impl::SoftwareSerial::setRX |
( |
uint8_t |
receivePin | ) |
|
|
private |
sets a specific pin to be 'the chosen one' as a rxPin
- Parameters
-
receivePin | the Pin-Id of the pin to setup |
◆ setTX()
void eagle_impl::SoftwareSerial::setTX |
( |
uint8_t |
transmitPin | ) |
|
|
private |
sets a specific pin to be 'the chosen one' as a txPin
- Parameters
-
transmitPin | the Pin-Id of the pin to setup |
◆ tunedDelay()
static void eagle_impl::SoftwareSerial::tunedDelay |
( |
uint16_t |
delay | ) |
|
|
inlinestaticprivate |
apply a specific delay to achieve higher precision
- Parameters
-
◆ tx_pin_write()
void eagle_impl::SoftwareSerial::tx_pin_write |
( |
uint8_t |
pin_state | ) |
|
|
inlineprivate |
writes a bool value on the txPin by registers
- Parameters
-
pin_state | the state the pin should be assigned to |
◆ write()
virtual size_t eagle_impl::SoftwareSerial::write |
( |
uint8_t |
byte | ) |
|
|
virtual |
writes a specific value to the tx register
- Parameters
-
- Returns
- 0 if there's an error with the delay
-
1 if the writing was successful
◆ _buffer_overflow
uint16_t eagle_impl::SoftwareSerial::_buffer_overflow |
|
private |
◆ _inverse_logic
uint16_t eagle_impl::SoftwareSerial::_inverse_logic |
|
private |
determining if all pin reads etc whould be inverted (e.g. no pullup on rx);
Definition at line 72 of file eagle_SoftwareSerial.h.
◆ _receive_buffer
char eagle_impl::SoftwareSerial::_receive_buffer[64] |
|
staticprivate |
◆ _receive_buffer_head
volatile uint8_t eagle_impl::SoftwareSerial::_receive_buffer_head |
|
staticprivate |
◆ _receive_buffer_tail
volatile uint8_t eagle_impl::SoftwareSerial::_receive_buffer_tail |
|
staticprivate |
◆ _receiveBitMask
uint8_t eagle_impl::SoftwareSerial::_receiveBitMask |
|
private |
◆ _receivePin
uint8_t eagle_impl::SoftwareSerial::_receivePin |
|
private |
◆ _receivePortRegister
volatile uint8_t* eagle_impl::SoftwareSerial::_receivePortRegister |
|
private |
◆ _rx_delay_centering
uint16_t eagle_impl::SoftwareSerial::_rx_delay_centering |
|
private |
◆ _rx_delay_intrabit
uint16_t eagle_impl::SoftwareSerial::_rx_delay_intrabit |
|
private |
◆ _rx_delay_stopbit
uint16_t eagle_impl::SoftwareSerial::_rx_delay_stopbit |
|
private |
◆ _transmitBitMask
uint8_t eagle_impl::SoftwareSerial::_transmitBitMask |
|
private |
◆ _transmitPortRegister
volatile uint8_t* eagle_impl::SoftwareSerial::_transmitPortRegister |
|
private |
◆ _tx_delay
uint16_t eagle_impl::SoftwareSerial::_tx_delay |
|
private |
◆ active_object
The documentation for this class was generated from the following file: