Smartcar Shield
|
#include <ArduinoRuntime.hpp>
Public Member Functions | |
void | setPinDirection (uint8_t pin, uint8_t direction) override |
Set pin direction, equivalent of pinMode in Arduino. More... | |
void | setPinState (uint8_t pin, uint8_t state) override |
Set pin state, equivalent of digitalWrite in Arduino. More... | |
int | getPinState (uint8_t pin) override |
Get the pin state, equivalent of digitalRead in Arduino. More... | |
int | getAnalogPinState (uint8_t pin) override |
Get pin's analog (ADC) reading, equivalent of analogRead in Arduino. More... | |
void | setPWM (uint8_t pin, int dutyCycle) override |
Set PWM state, equivalent of analogWrite in Arduino. More... | |
void | i2cInit () override |
Initialize I2C bus as master, equivalent of Wire.begin in Arduino. More... | |
void | i2cBeginTransmission (uint8_t address) override |
Initiate a transmission to the specified I2C slave device, equivalent of Wire.beginTransmission in Arduino. More... | |
size_t | i2cWrite (uint8_t value) override |
Send the specified byte via i2c, equivalent of Wire.write in Arduino. More... | |
uint8_t | i2cEndTransmission () override |
Ends a transmission to an I2C device equivalent of Wire.endTransmission in Arduino. More... | |
uint8_t | i2cRequestFrom (uint8_t address, uint8_t numberOfBytes) override |
Request a number of bytes from the specified I2C slave, equivalent of Wire.requestFrom in Arduino. More... | |
int | i2cAvailable () override |
Gets the number of bytes available to be retrieved, equivalent of Wire.available O in Arduino. More... | |
int | i2cRead () override |
Reads a byte from I2C bus, equivalent of Wire.read in Arduino. More... | |
int8_t | pinToInterrupt (uint8_t pin) override |
Gets the interrupt number of the specified pin, equivalent of digitalPinToInterrupt in Arduino. More... | |
unsigned long | currentTimeMillis () override |
Gets the amount of milliseconds since the microcontroller started running, equivalent of millis in Arduino. More... | |
unsigned long | currentTimeMicros () override |
Gets the amount of microseconds since the microcontroller started running, equivalent of micros in Arduino. More... | |
void | delayMillis (unsigned long milliseconds) override |
Block the execution for the specified number of milliseconds, equivalent of delay in Arduino. More... | |
void | delayMicros (unsigned int microseconds) override |
Block the execution for the specified number of microseconds, equivalent of delayMicroseconds in Arduino. More... | |
unsigned long | getPulseDuration (uint8_t pin, uint8_t state, unsigned long timeout) override |
Gets the incomming pulse length in microseconds starting from the nearest state , equivalent to pulseIn in Arduino. More... | |
void | setInterrupt (uint8_t pin, InterruptCallback callback, int mode) override |
Enables an external hardware interrupt and provides a callback, equivalent to attachInterrupt in Arduino. More... | |
uint8_t | getLowState () const override |
Get the runtime-specific value representing a logical LOW voltage state. More... | |
uint8_t | getHighState () const override |
Get the runtime-specific value representing a logical HIGH voltage state. More... | |
uint8_t | getOutputState () const override |
Get the runtime-specific value representing an OUTPUT pin state. More... | |
uint8_t | getInputState () const override |
Get the runtime-specific value representing an INPUT pin state. More... | |
int | getRisingEdgeMode () const override |
Get the rising edge constant for setting an interrupt. More... | |
Public Member Functions inherited from Runtime | |
virtual | ~Runtime ()=default |
The class to programatically represent the Arduino runtime environment or alternatively calls to the AVR and Arduino libraries.
Definition at line 11 of file ArduinoRuntime.hpp.
|
overridevirtual |
Gets the amount of microseconds since the microcontroller started running, equivalent of micros
in Arduino.
Implements Runtime.
Definition at line 88 of file ArduinoRuntime.cpp.
|
overridevirtual |
Gets the amount of milliseconds since the microcontroller started running, equivalent of millis
in Arduino.
Implements Runtime.
Definition at line 83 of file ArduinoRuntime.cpp.
|
overridevirtual |
Block the execution for the specified number of microseconds, equivalent of delayMicroseconds
in Arduino.
microseconds | How much time to block execution in microseconds |
Implements Runtime.
Definition at line 98 of file ArduinoRuntime.cpp.
|
overridevirtual |
Block the execution for the specified number of milliseconds, equivalent of delay
in Arduino.
milliseconds | How much time to block execution in milliseconds |
Implements Runtime.
Definition at line 93 of file ArduinoRuntime.cpp.
|
overridevirtual |
Get pin's analog (ADC) reading, equivalent of analogRead
in Arduino.
pin | Pin to get ADC reading |
Implements Runtime.
Definition at line 30 of file ArduinoRuntime.cpp.
|
overridevirtual |
Get the runtime-specific value representing a logical HIGH
voltage state.
HIGH
value Implements Runtime.
Definition at line 118 of file ArduinoRuntime.cpp.
|
overridevirtual |
Get the runtime-specific value representing an INPUT
pin state.
INPUT
state Implements Runtime.
Definition at line 128 of file ArduinoRuntime.cpp.
|
overridevirtual |
Get the runtime-specific value representing a logical LOW
voltage state.
LOW
value Implements Runtime.
Definition at line 113 of file ArduinoRuntime.cpp.
|
overridevirtual |
Get the runtime-specific value representing an OUTPUT
pin state.
OUTPUT
state Implements Runtime.
Definition at line 123 of file ArduinoRuntime.cpp.
|
overridevirtual |
Get the pin state, equivalent of digitalRead
in Arduino.
pin | Pin to get state |
Implements Runtime.
Definition at line 25 of file ArduinoRuntime.cpp.
|
overridevirtual |
Gets the incomming pulse length in microseconds starting from the nearest state
, equivalent to pulseIn
in Arduino.
pin | The pin to expect the pulse |
state | The state (HIGH or LOW ) of the incoming pulse |
timeout | How long to wait for a complete pulse in microseconds |
0
if no pulse arrived otherwise the pulse length in in microseconds Implements Runtime.
Definition at line 103 of file ArduinoRuntime.cpp.
|
overridevirtual |
Get the rising edge constant for setting an interrupt.
Implements Runtime.
Definition at line 133 of file ArduinoRuntime.cpp.
|
overridevirtual |
Gets the number of bytes available to be retrieved, equivalent of Wire.available
O in Arduino.
Implements Runtime.
Definition at line 68 of file ArduinoRuntime.cpp.
|
overridevirtual |
Initiate a transmission to the specified I2C slave device, equivalent of Wire.beginTransmission
in Arduino.
address | I2C address to begin a transmission to |
Implements Runtime.
Definition at line 48 of file ArduinoRuntime.cpp.
|
overridevirtual |
Ends a transmission to an I2C device equivalent of Wire.endTransmission
in Arduino.
Implements Runtime.
Definition at line 58 of file ArduinoRuntime.cpp.
|
overridevirtual |
Initialize I2C bus as master, equivalent of Wire.begin
in Arduino.
Implements Runtime.
Definition at line 43 of file ArduinoRuntime.cpp.
|
overridevirtual |
Reads a byte from I2C bus, equivalent of Wire.read
in Arduino.
Implements Runtime.
Definition at line 73 of file ArduinoRuntime.cpp.
|
overridevirtual |
Request a number of bytes from the specified I2C slave, equivalent of Wire.requestFrom
in Arduino.
address | I2C slave device address |
numberOfBytes | Number of bytes to request |
Implements Runtime.
Definition at line 63 of file ArduinoRuntime.cpp.
|
overridevirtual |
Send the specified byte via i2c, equivalent of Wire.write
in Arduino.
value | Byte to send |
Implements Runtime.
Definition at line 53 of file ArduinoRuntime.cpp.
|
overridevirtual |
Gets the interrupt number of the specified pin, equivalent of digitalPinToInterrupt
in Arduino.
pin | Pin to get interrupt number |
Implements Runtime.
Definition at line 78 of file ArduinoRuntime.cpp.
|
overridevirtual |
Enables an external hardware interrupt and provides a callback, equivalent to attachInterrupt
in Arduino.
pin | The interrupt pin to attach the interrupt |
callback | The callback to be executed |
mode | The state of the pin to run the callback |
Implements Runtime.
Definition at line 108 of file ArduinoRuntime.cpp.
|
overridevirtual |
Set pin direction, equivalent of pinMode
in Arduino.
pin | The pin to set direction |
direction | The pin's direction (e.g. INPUT , OUTPUT etc) |
Implements Runtime.
Definition at line 15 of file ArduinoRuntime.cpp.
|
overridevirtual |
Set pin state, equivalent of digitalWrite
in Arduino.
pin | The pin to set state |
state | The pin's state (i.e. HIGH or LOW ) |
Implements Runtime.
Definition at line 20 of file ArduinoRuntime.cpp.
|
overridevirtual |
Set PWM state, equivalent of analogWrite
in Arduino.
pin | Pin to set PWM |
dutyCycle | Duty cycle of PWM |
Implements Runtime.
Definition at line 35 of file ArduinoRuntime.cpp.