eBoard ๐Ÿ‰  โ‘ โ‘งโ‘จ
Written for SIA 2017/2018
eBoard.h File Reference
#include <avr/pgmspace.h>
#include "Arduino.h"
#include <avr/io.h>
#include <avr/interrupt.h>
#include <compat/twi.h>
#include "pins_arduino.h"
#include <inttypes.h>
#include "Stream.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <avr/wdt.h>
#include <assert.h>
+ Include dependency graph for eBoard.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  eagle_impl::TwoWire
 This is used to avoid path resolving issues and defines the common known Arduino Wire-Interface
        Don't use manually More...
 
struct  eagle_impl::SPIClass
 [SPI] This is used to avoid path resolving issues and defines the common known Arduino SPI interface
        Don't use manually More...
 
class  eagle_impl::SoftwareSerial
 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...
 
struct  _DELAY_TABLE
 
struct  ServoCds55
 
struct  SoccerBoard
 [COPY&PASTE] This is the SoccerBoard ghost struct :D More...
 
struct  I2CInOut
 [COPY&PASTE] This is the I2CInOut ghost struct :D More...
 
struct  AX12Servo
 [COPY&PASTE] This is the AX12Servo ghost struct :D More...
 
struct  DynamixelBoard
 [COPY&PASTE] This is the DynamixelBoard ghost struct :D More...
 
struct  RB14Scan
 [COPY&PASTE] [BLUETOOTH] This is the RB14Scan ghost struct :D More...
 
struct  LCD
 [I2C] [LCD] This is used to add support for OLED displays connected to the 'SoccerBoard' More...
 
struct  NeoPixel
 [NEO] this allows you to access Adafruit LED-stripes More...
 
struct  ServoPin_t
 
struct  servo_t
 
class  Servo
 

Namespaces

 eagle_impl
 this namespace contains all the Don't use manually classes ;)
 

Macros

#define EBOARD_VERSION   "3.0c"
 
#define VALUE_TO_STRING(x)   #x
 
#define VALUE(x)   VALUE_TO_STRING(x)
 
#define PPERFORM_PRAGMA(str)   _Pragma(#str)
 
#define DEBUG_MSG(str)   PPERFORM_PRAGMA(message ("" #str))
 
#define MACRO_MSG(mac, str)   PPERFORM_PRAGMA(message("You set " #mac " to " VALUE(mac) ": " #str))
 
#define EBOARD_HEADER_GUARD
 
#define ARDUINO   200
 
#define EBOARD_I2C   0x1
 
#define EBOARD_LCD   0x1
 
#define EBOARD_SHIFT_REGISTER   0x1
 
#define EBOARD_BLUETOOTH   0x1
 
#define REPT_TASK
 
#define __AVR_ATmega2560__
 
#define __AVR_ATmega328P__
 
#define EBOARD_NEO   0x1
 
#define HIGHSPEED
 
#define __AVR__
 
#define EBOARD_GUESSPATH   0x1
 
#define main   eVirtual_main
 
#define PIN_MAX   0x32
 
#define twi_h
 
#define TWI_FREQ   100000L
 
#define TWI_BUFFER_LENGTH   32
 
#define TWI_READY   0
 
#define TWI_MRX   1
 
#define TWI_MTX   2
 
#define TWI_SRX   3
 
#define TWI_STX   4
 
#define cbi(sfr, bit)   (_SFR_BYTE(sfr) &= ~_BV(bit))
 
#define sbi(sfr, bit)   (_SFR_BYTE(sfr) |= _BV(bit))
 
#define BUFFER_LENGTH   32
 
#define EBOARD_USE_SPI   0x1
 
#define _SPI_H_INCLUDED
 
#define SPI_CLOCK_DIV4   0x00
 
#define SPI_CLOCK_DIV16   0x01
 
#define SPI_CLOCK_DIV64   0x02
 
#define SPI_CLOCK_DIV128   0x03
 
#define SPI_CLOCK_DIV2   0x04
 
#define SPI_CLOCK_DIV8   0x05
 
#define SPI_CLOCK_DIV32   0x06
 
#define SPI_MODE0   0x00
 
#define SPI_MODE1   0x04
 
#define SPI_MODE2   0x08
 
#define SPI_MODE3   0x0C
 
#define SPI_MODE_MASK   0x0C
 
#define SPI_CLOCK_MASK   0x03
 
#define SPI_2XCLOCK_MASK   0x01
 
#define EBOARD_DEBUG_MODE   0x1
 
#define EBOARD_NANO   0x0
 
#define EBOARD_CHECK_PINS   0x1
 
#define EBOARD_CHECK_PINS_PWM   0x1
 
#define EBOARD_DEBUG_SPEED   9600
 
#define EBOARD_SPI_SERVO_MAX   2
 
#define EBOARD_USE_UTILITY   0x1
 
#define EBOARD_COPY_AND_PASTE   0x1
 
#define EBOARD_PWM_SPE   1
 
#define EBOARD_CLAMP   0x1
 
#define EBOARD_USE_RESET   0x1
 
#define PIN_BLUETOOTH_STATE   0x13
 
#define PIN_BLUETOOTH_RX   0x13
 
#define PIN_BLUETOOTH_TX   0x12
 
#define PIN_MOTOR_DIR   0x4
 
#define PIN_MOTOR_SPE   0x5
 
#define PIN_SHIFT_CLK   0x6
 
#define PIN_SHIFT_DAT   0x7
 
#define PIN_SHIFT_LAT   0x8
 
#define _SS_MAX_RX_BUFF   64
 
#define GCC_VERSION   (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
 
#define _DEBUG   0
 
#define _DEBUG_PIN1   11
 
#define _DEBUG_PIN2   13
 
#define __ASSERT_USE_STDERR
 
#define DIGITAL_IN   0x0
 
#define DIGITAL_IN_INV   0x1
 
#define DIGITAL_IN_PULLUP   0x2
 
#define DIGITAL_IN_PULLUP_INV   0x3
 
#define DIGITAL_OUT   0x4
 
#define DIGITAL_OUT_INV   0x5
 
#define DIGITAL_OUT_LOW   0x6
 
#define DIGITAL_OUT_HIGH   0x7
 
#define ANALOG_IN_8_BIT   0x8
 
#define ANALOG_IN_10_BIT   0x9
 
#define ANALOG_IN_MEAN_8_BIT   0xA
 
#define ANALOG_IN_MEAN_10_BIT   0xB
 
#define COUNTER_8_BIT   0xC
 
#define COUNTER_16_BIT   0xD
 
#define COUNTER_RISE_8_BIT   0xE
 
#define COUNTER_RISE_16_BIT   0xF
 
#define PWM_SLOW   0x8
 
#define PWM_FAST   0x9
 
#define FREQ_LOW   0xA
 
#define FREQ_HIGH   0xB
 
#define COUNTER_B_DIR   0xC
 
#define COUNTER_B_DIR_PULLUP   0xD
 
#define COUNTER_MEAN_8_BIT   0xE
 
#define COUNTER_MEAN_16_BIT   0xF
 
#define LCD_COMMAND_MODE   0x80
 
#define LCD_DATA_MODE   0x40
 
#define LCD_COMMAND_DISPLAY_OFF   0xAE
 
#define LCD_COMMAND_DISPLAY_ON   0xAF
 
#define LCD_COMMAND_BLACK_BACKGROUND   0xA6
 
#define LCD_COMMAND_WHITE_BACKGROUND   0xA7
 
#define LCD_COMMAND_SET_BRIGHTNESS   0x81
 
#define LCD_PAGE_ADDRESSING   0x02
 
#define LCD_HORIZONTAL_ADDRESSING   0x00
 
#define LCD_COMMAND_CHARGE_PUMP_SETTING   0x8d
 
#define LCD_COMMAND_CHARGE_PUMP_ENABLE   0x14
 
#define LCD_WIDTH   128
 
#define LCD_HEIGHT   64
 
#define EBOARD_NEO_RGB   ((0 << 6) | (0 << 4) | (1 << 2) | (2))
 
#define EBOARD_NEO_RBG   ((0 << 6) | (0 << 4) | (2 << 2) | (1))
 
#define EBOARD_NEO_GRB   ((1 << 6) | (1 << 4) | (0 << 2) | (2))
 
#define EBOARD_NEO_GBR   ((2 << 6) | (2 << 4) | (0 << 2) | (1))
 
#define EBOARD_NEO_BRG   ((1 << 6) | (1 << 4) | (2 << 2) | (0))
 
#define EBOARD_NEO_BGR   ((2 << 6) | (2 << 4) | (1 << 2) | (0))
 
#define EBOARD_NEO_WRGB   ((0 << 6) | (1 << 4) | (2 << 2) | (3))
 
#define EBOARD_NEO_WRBG   ((0 << 6) | (1 << 4) | (3 << 2) | (2))
 
#define EBOARD_NEO_WGRB   ((0 << 6) | (2 << 4) | (1 << 2) | (3))
 
#define EBOARD_NEO_WGBR   ((0 << 6) | (3 << 4) | (1 << 2) | (2))
 
#define EBOARD_NEO_WBRG   ((0 << 6) | (2 << 4) | (3 << 2) | (1))
 
#define EBOARD_NEO_WBGR   ((0 << 6) | (3 << 4) | (2 << 2) | (1))
 
#define EBOARD_NEO_RWGB   ((1 << 6) | (0 << 4) | (2 << 2) | (3))
 
#define EBOARD_NEO_RWBG   ((1 << 6) | (0 << 4) | (3 << 2) | (2))
 
#define EBOARD_NEO_RGWB   ((2 << 6) | (0 << 4) | (1 << 2) | (3))
 
#define EBOARD_NEO_RGBW   ((3 << 6) | (0 << 4) | (1 << 2) | (2))
 
#define EBOARD_NEO_RBWG   ((2 << 6) | (0 << 4) | (3 << 2) | (1))
 
#define EBOARD_NEO_RBGW   ((3 << 6) | (0 << 4) | (2 << 2) | (1))
 
#define EBOARD_NEO_GWRB   ((1 << 6) | (2 << 4) | (0 << 2) | (3))
 
#define EBOARD_NEO_GWBR   ((1 << 6) | (3 << 4) | (0 << 2) | (2))
 
#define EBOARD_NEO_GRWB   ((2 << 6) | (1 << 4) | (0 << 2) | (3))
 
#define EBOARD_NEO_GRBW   ((3 << 6) | (1 << 4) | (0 << 2) | (2))
 
#define EBOARD_NEO_GBWR   ((2 << 6) | (3 << 4) | (0 << 2) | (1))
 
#define EBOARD_NEO_GBRW   ((3 << 6) | (2 << 4) | (0 << 2) | (1))
 
#define EBOARD_NEO_BWRG   ((1 << 6) | (2 << 4) | (3 << 2) | (0))
 
#define EBOARD_NEO_BWGR   ((1 << 6) | (3 << 4) | (2 << 2) | (0))
 
#define EBOARD_NEO_BRWG   ((2 << 6) | (1 << 4) | (3 << 2) | (0))
 
#define EBOARD_NEO_BRGW   ((3 << 6) | (1 << 4) | (2 << 2) | (0))
 
#define EBOARD_NEO_BGWR   ((2 << 6) | (3 << 4) | (1 << 2) | (0))
 
#define EBOARD_NEO_BGRW   ((3 << 6) | (2 << 4) | (1 << 2) | (0))
 
#define EBOARD_NEO_800KHZ   0x0000
 
#define EBOARD_NEO_400KHZ   0x0100
 
#define _useTimer1
 
#define MIN_PULSE_WIDTH   544
 
#define MAX_PULSE_WIDTH   2400
 
#define DEFAULT_PULSE_WIDTH   1500
 
#define REFRESH_INTERVAL   20000
 
#define SERVOS_PER_TIMER   12
 
#define MAX_SERVOS   (_Nbr_16timers * SERVOS_PER_TIMER)
 
#define INVALID_SERVO   255
 
#define usToTicks(_us)   (( clockCyclesPerMicrosecond()* _us) / 8)
 
#define ticksToUs(_ticks)   (( (unsigned)_ticks * 8)/ clockCyclesPerMicrosecond() )
 
#define TRIM_DURATION   2
 
#define SERVO_INDEX_TO_TIMER(_servo_nbr)   ((timer16_Sequence_t)(_servo_nbr / SERVOS_PER_TIMER))
 
#define SERVO_INDEX_TO_CHANNEL(_servo_nbr)   (_servo_nbr % SERVOS_PER_TIMER)
 
#define SERVO_INDEX(_timer, _channel)   ((_timer*SERVOS_PER_TIMER) + _channel)
 
#define SERVO(_timer, _channel)   (servos[SERVO_INDEX(_timer,_channel)])
 
#define SERVO_MIN()   (MIN_PULSE_WIDTH - this->min * 4)
 
#define SERVO_MAX()   (MAX_PULSE_WIDTH - this->max * 4)
 

Typedefs

typedef int optVAL_t
 
typedef struct _DELAY_TABLE DELAY_TABLE
 

Enumerations

enum  timer16_Sequence_t { _timer1, _Nbr_16timers }
 

Functions

 _Pragma ("message (\ \\f you do not want any preprocessing information from this eBoard-Header set 1 to 0\\")
 
 _Pragma ("message (\ \\ou are using eBoard-header v3.0c written by EagleoutIce\\")
 
 _Pragma ("message (\ \\ocumentation macro SET => Full doc features enabled\\")
 
 _Pragma ("message (\ \\ou are using Guesspath! Necessary libraries for eBoard will be included automatically\\")
 
 _Pragma ("message (\ \\uilding for Arduino Mega with ATmega2560\\")
 
 _Pragma ("message (\ \\ou enabled IยฒC feature\s\")
 
void twi_init (void)
 
void twi_setAddress (uint8_t address)
 
uint8_t twi_readFrom (uint8_t address, uint8_t *data, uint8_t length, uint8_t sendStop)
 
uint8_t twi_writeTo (uint8_t address, uint8_t *data, uint8_t length, uint8_t wait, uint8_t sendStop)
 
uint8_t twi_transmit (const uint8_t *data, uint8_t length)
 
void twi_attachSlaveRxEvent (void(*function)(uint8_t *, int))
 
void twi_attachSlaveTxEvent (void(*function)(void))
 
void twi_reply (uint8_t ack)
 
void twi_stop (void)
 
void twi_releaseBus (void)
 
 ISR (TWI_vect)
 
 _Pragma ("message (\ \\ou enabled SPI\\")
 
 _Pragma ("message (\ \\ou enabled LCD\\")
 
 _Pragma ("message (\ \\ou did not define IGNORE_SIZE: int will be used\\")
 
 _Pragma ("message(\ou set \\0x1 \\to \\x1\\ \\\erial feedback will be send to Computer\\")
 
 _Pragma ("message(\ou set \\0x0 \\to \\x0\\ \\\sing Arduino UNO/MEGA environment\\")
 
 _Pragma ("message(\ou set \\0x1 \\to \\x1\\ \\\heck for Pins enabled\\")
 
 _Pragma ("message(\ou set \\0x1 \\to \\x1\\ \\\hiftregister enabled\\")
 
 _Pragma ("message(\ou set \\0x1 \\to \\x1\\ \\\heck for PWM-Pins enabled\\")
 
 _Pragma ("message(\ou set \\0x1 \\to \\x1\\ \\\tility features will be implemented\\")
 
 _Pragma ("message(\ou set \\0x1 \\to \\x1\\ \\\luetooth controls enabled\\")
 
 _Pragma ("message(\ou set \\0x1 \\to \\x1\\ \\\otor Range is set to [0;1023]\\")
 
 _Pragma ("message(\ou set \\0x1 \\to \\x1\\ \\\dafruit Neo-Pixel support enabled\\")
 
 _Pragma ("message(\ou set \\0x1 \\to \\x1\\ \\\oftware-Reset is available\\")
 
void DebugPulse (uint8_t pin, uint8_t count)
 
SoftwareSerial _serial (0x13, 0x12)
 
void __assert (const char *__func, const char *__file, optVAL_t __lineno, const char *__sexp)
 [DEBUG_MODE] custom assert message More...
 
void checkIdx (optVAL_t idx)
 [DEBUG_MODE] used to check if a pin index is in bounds More...
 
optVAL_t countSetBits (optVAL_t x)
 [COPY&PASTE] [CHECK_PWM] counts high-bits in an int/byte (determined by IGNORE_SIZE) More...
 
bool checkPin (optVAL_t idx, optVAL_t mode=0x1)
 [COPY&PASTE] [CHECK_PINS] Check if a pin is set to a specific mode More...
 
void setPin (optVAL_t idx, optVAL_t mode=0x1)
 [COPY&PASTE] set a pin to a certain mode => checkPin() will return true then More...
 
char readVal (char oF='.')
 [BLUETOOTH] reads a single value from bluetooth if available! More...
 
bool checkOverflow (void)
 [BLUETOOTH] checks if theres a lack of Data! More...
 
template<typename T >
void writeVal (const T &val)
 [BLUETOOTH] writes Data to bluetooth More...
 
bool isConnected (void)
 [BLUETOOTH] this will check if the HC-05 is paired More...
 
void shiftSingle (optVAL_t idx, bool val)
 [SHIFT] Changes a single output Pin More...
 
void shiftAll (void)
 [SHIFT] Changes bits according to store_bits More...
 
void writePWM (optVAL_t val)
 write a clamped pwm value to an output pin More...
 
void rept_task (void)
 
void writePin (optVAL_t idx, bool val)
 write a boolean state to an output pin More...
 
optVAL_t readPin (optVAL_t idx, bool dig=true)
 read a digital state from an INPUTpin More...
 
optVAL_t sendI2C (optVAL_t deviceID, byte *buf, byte buf_len)
 Sends a buffer of bytes to a certain IยฒC-Device. More...
 
optVAL_t sendI2C (optVAL_t deviceID, byte buf)
 Sends a byte to a certain I2C-Device. More...
 
void pingI2C (optVAL_t ret[], optVAL_t ret_len)
 Sends a byte to a certain IยฒC-Device. More...
 
void readI2C (optVAL_t deviceID, optVAL_t ret[], optVAL_t ret_len, bool blocking=true)
 Reads a special amount of bits from a certain IยฒC-Device. More...
 
static void handle_interrupts (timer16_Sequence_t timer, volatile uint16_t *TCNTn, volatile uint16_t *OCRnA)
 
 SIGNAL (TIMER1_COMPA_vect)
 
static void initISR (timer16_Sequence_t timer)
 
static void finISR (timer16_Sequence_t timer)
 
static boolean isTimerActive (timer16_Sequence_t timer)
 
void trig_rept_task ()
 
 ISR (TIMER2_OVF_vect)
 
int eVirtual_main ()
 
void setup (void)
 this is a guard More...
 
void loop (void)
 [COPY&PASTE] As we have an Arduino we need a setup function ;) More...
 
void set_motor_speed (optVAL_t spe)
 
void set_steer_angle (optVAL_t ang)
 

Variables

static volatile uint8_t twi_state
 
static volatile uint8_t twi_slarw
 
static volatile uint8_t twi_sendStop
 
static volatile uint8_t twi_inRepStart
 
static void(* twi_onSlaveTransmit )(void)
 
static void(* twi_onSlaveReceive )(uint8_t *, int)
 
static uint8_t twi_masterBuffer [32]
 
static volatile uint8_t twi_masterBufferIndex
 
static volatile uint8_t twi_masterBufferLength
 
static uint8_t twi_txBuffer [32]
 
static volatile uint8_t twi_txBufferIndex
 
static volatile uint8_t twi_txBufferLength
 
static uint8_t twi_rxBuffer [32]
 
static volatile uint8_t twi_rxBufferIndex
 
static volatile uint8_t twi_error
 
TwoWire Wire = TwoWire()
 
SPIClass SPI
 
static bool STOP = false
 
uint64_t pin_out = 0x0
 
uint64_t pin_in = 0x0
 
long store_bits = 0L
 
optVAL_t _pwmValue = 0x0
 
optVAL_t _OpwmValue = 0x0
 
ServoCds55 _servoHandler
 
PROGMEM const byte basicFont [][8]
 
static const uint8_t PROGMEM _sineTable [256]
 
static const uint8_t PROGMEM _gammaTable [256]
 
static servo_t servos [(_Nbr_16timers *12)]
 
static volatile int8_t Channel [_Nbr_16timers]
 
uint8_t ServoCount = 0
 
int timer_count = 0
 
bool timer_ofl = false
 

Macro Definition Documentation

◆ __ASSERT_USE_STDERR

#define __ASSERT_USE_STDERR

Definition at line 1262 of file eBoard.h.

◆ __AVR__

#define __AVR__

Definition at line 53 of file eBoard.h.

◆ __AVR_ATmega2560__

#define __AVR_ATmega2560__

Definition at line 45 of file eBoard.h.

◆ __AVR_ATmega328P__

#define __AVR_ATmega328P__

Definition at line 47 of file eBoard.h.

◆ _DEBUG

#define _DEBUG   0

Definition at line 926 of file eBoard.h.

◆ _DEBUG_PIN1

#define _DEBUG_PIN1   11

◆ _DEBUG_PIN2

#define _DEBUG_PIN2   13

◆ _SPI_H_INCLUDED

#define _SPI_H_INCLUDED

Definition at line 554 of file eBoard.h.

◆ _SS_MAX_RX_BUFF

#define _SS_MAX_RX_BUFF   64

◆ _useTimer1

#define _useTimer1

Definition at line 3563 of file eBoard.h.

◆ ANALOG_IN_10_BIT

#define ANALOG_IN_10_BIT   0x9

Definition at line 1697 of file eBoard.h.

◆ ANALOG_IN_8_BIT

#define ANALOG_IN_8_BIT   0x8

Definition at line 1695 of file eBoard.h.

◆ ANALOG_IN_MEAN_10_BIT

#define ANALOG_IN_MEAN_10_BIT   0xB

Definition at line 1701 of file eBoard.h.

◆ ANALOG_IN_MEAN_8_BIT

#define ANALOG_IN_MEAN_8_BIT   0xA

Definition at line 1699 of file eBoard.h.

◆ ARDUINO

#define ARDUINO   200

Definition at line 33 of file eBoard.h.

◆ BUFFER_LENGTH

#define BUFFER_LENGTH   32

Definition at line 330 of file eBoard.h.

Referenced by eagle_impl::TwoWire::requestFrom(), and eagle_impl::TwoWire::write().

◆ cbi

#define cbi (   sfr,
  bit 
)    (_SFR_BYTE(sfr) &= ~_BV(bit))

Definition at line 108 of file eBoard.h.

Referenced by twi_init().

◆ COUNTER_16_BIT

#define COUNTER_16_BIT   0xD

Definition at line 1705 of file eBoard.h.

◆ COUNTER_8_BIT

#define COUNTER_8_BIT   0xC

Definition at line 1703 of file eBoard.h.

◆ COUNTER_B_DIR

#define COUNTER_B_DIR   0xC

Definition at line 1719 of file eBoard.h.

◆ COUNTER_B_DIR_PULLUP

#define COUNTER_B_DIR_PULLUP   0xD

Definition at line 1721 of file eBoard.h.

◆ COUNTER_MEAN_16_BIT

#define COUNTER_MEAN_16_BIT   0xF

Definition at line 1725 of file eBoard.h.

◆ COUNTER_MEAN_8_BIT

#define COUNTER_MEAN_8_BIT   0xE

Definition at line 1723 of file eBoard.h.

◆ COUNTER_RISE_16_BIT

#define COUNTER_RISE_16_BIT   0xF

Definition at line 1709 of file eBoard.h.

◆ COUNTER_RISE_8_BIT

#define COUNTER_RISE_8_BIT   0xE

Definition at line 1707 of file eBoard.h.

◆ DEBUG_MSG

#define DEBUG_MSG (   str)    PPERFORM_PRAGMA(message ("" #str))

Definition at line 17 of file eBoard.h.

◆ DEFAULT_PULSE_WIDTH

#define DEFAULT_PULSE_WIDTH   1500

Definition at line 3567 of file eBoard.h.

Referenced by Servo::Servo().

◆ DIGITAL_IN

#define DIGITAL_IN   0x0

Definition at line 1679 of file eBoard.h.

◆ DIGITAL_IN_INV

#define DIGITAL_IN_INV   0x1

Definition at line 1681 of file eBoard.h.

◆ DIGITAL_IN_PULLUP

#define DIGITAL_IN_PULLUP   0x2

Definition at line 1683 of file eBoard.h.

◆ DIGITAL_IN_PULLUP_INV

#define DIGITAL_IN_PULLUP_INV   0x3

Definition at line 1685 of file eBoard.h.

◆ DIGITAL_OUT

#define DIGITAL_OUT   0x4

Definition at line 1687 of file eBoard.h.

◆ DIGITAL_OUT_HIGH

#define DIGITAL_OUT_HIGH   0x7

Definition at line 1693 of file eBoard.h.

◆ DIGITAL_OUT_INV

#define DIGITAL_OUT_INV   0x5

Definition at line 1689 of file eBoard.h.

◆ DIGITAL_OUT_LOW

#define DIGITAL_OUT_LOW   0x6

Definition at line 1691 of file eBoard.h.

◆ EBOARD_BLUETOOTH

#define EBOARD_BLUETOOTH   0x1

Definition at line 41 of file eBoard.h.

◆ EBOARD_CHECK_PINS

#define EBOARD_CHECK_PINS   0x1

Definition at line 680 of file eBoard.h.

◆ EBOARD_CHECK_PINS_PWM

#define EBOARD_CHECK_PINS_PWM   0x1

Definition at line 698 of file eBoard.h.

◆ EBOARD_CLAMP

#define EBOARD_CLAMP   0x1

Definition at line 752 of file eBoard.h.

◆ EBOARD_COPY_AND_PASTE

#define EBOARD_COPY_AND_PASTE   0x1

Definition at line 729 of file eBoard.h.

◆ EBOARD_DEBUG_MODE

#define EBOARD_DEBUG_MODE   0x1

Definition at line 652 of file eBoard.h.

◆ EBOARD_DEBUG_SPEED

#define EBOARD_DEBUG_SPEED   9600

Definition at line 707 of file eBoard.h.

Referenced by setup().

◆ EBOARD_GUESSPATH

#define EBOARD_GUESSPATH   0x1

Definition at line 62 of file eBoard.h.

◆ EBOARD_HEADER_GUARD

#define EBOARD_HEADER_GUARD

Definition at line 30 of file eBoard.h.

◆ EBOARD_I2C

#define EBOARD_I2C   0x1

Definition at line 35 of file eBoard.h.

◆ EBOARD_LCD

#define EBOARD_LCD   0x1

Definition at line 37 of file eBoard.h.

◆ EBOARD_NANO

#define EBOARD_NANO   0x0

Definition at line 661 of file eBoard.h.

◆ EBOARD_NEO

#define EBOARD_NEO   0x1

Definition at line 49 of file eBoard.h.

◆ EBOARD_NEO_400KHZ

#define EBOARD_NEO_400KHZ   0x0100

Definition at line 2345 of file eBoard.h.

◆ EBOARD_NEO_800KHZ

#define EBOARD_NEO_800KHZ   0x0000

Definition at line 2343 of file eBoard.h.

◆ EBOARD_NEO_BGR

#define EBOARD_NEO_BGR   ((2 << 6) | (2 << 4) | (1 << 2) | (0))

Definition at line 2291 of file eBoard.h.

◆ EBOARD_NEO_BGRW

#define EBOARD_NEO_BGRW   ((3 << 6) | (2 << 4) | (1 << 2) | (0))

Definition at line 2341 of file eBoard.h.

◆ EBOARD_NEO_BGWR

#define EBOARD_NEO_BGWR   ((2 << 6) | (3 << 4) | (1 << 2) | (0))

Definition at line 2339 of file eBoard.h.

◆ EBOARD_NEO_BRG

#define EBOARD_NEO_BRG   ((1 << 6) | (1 << 4) | (2 << 2) | (0))

Definition at line 2289 of file eBoard.h.

◆ EBOARD_NEO_BRGW

#define EBOARD_NEO_BRGW   ((3 << 6) | (1 << 4) | (2 << 2) | (0))

Definition at line 2337 of file eBoard.h.

◆ EBOARD_NEO_BRWG

#define EBOARD_NEO_BRWG   ((2 << 6) | (1 << 4) | (3 << 2) | (0))

Definition at line 2335 of file eBoard.h.

◆ EBOARD_NEO_BWGR

#define EBOARD_NEO_BWGR   ((1 << 6) | (3 << 4) | (2 << 2) | (0))

Definition at line 2333 of file eBoard.h.

◆ EBOARD_NEO_BWRG

#define EBOARD_NEO_BWRG   ((1 << 6) | (2 << 4) | (3 << 2) | (0))

Definition at line 2331 of file eBoard.h.

◆ EBOARD_NEO_GBR

#define EBOARD_NEO_GBR   ((2 << 6) | (2 << 4) | (0 << 2) | (1))

Definition at line 2287 of file eBoard.h.

◆ EBOARD_NEO_GBRW

#define EBOARD_NEO_GBRW   ((3 << 6) | (2 << 4) | (0 << 2) | (1))

Definition at line 2329 of file eBoard.h.

◆ EBOARD_NEO_GBWR

#define EBOARD_NEO_GBWR   ((2 << 6) | (3 << 4) | (0 << 2) | (1))

Definition at line 2327 of file eBoard.h.

◆ EBOARD_NEO_GRB

#define EBOARD_NEO_GRB   ((1 << 6) | (1 << 4) | (0 << 2) | (2))

Definition at line 2285 of file eBoard.h.

◆ EBOARD_NEO_GRBW

#define EBOARD_NEO_GRBW   ((3 << 6) | (1 << 4) | (0 << 2) | (2))

Definition at line 2325 of file eBoard.h.

◆ EBOARD_NEO_GRWB

#define EBOARD_NEO_GRWB   ((2 << 6) | (1 << 4) | (0 << 2) | (3))

Definition at line 2323 of file eBoard.h.

◆ EBOARD_NEO_GWBR

#define EBOARD_NEO_GWBR   ((1 << 6) | (3 << 4) | (0 << 2) | (2))

Definition at line 2321 of file eBoard.h.

◆ EBOARD_NEO_GWRB

#define EBOARD_NEO_GWRB   ((1 << 6) | (2 << 4) | (0 << 2) | (3))

Definition at line 2319 of file eBoard.h.

◆ EBOARD_NEO_RBG

#define EBOARD_NEO_RBG   ((0 << 6) | (0 << 4) | (2 << 2) | (1))

Definition at line 2283 of file eBoard.h.

◆ EBOARD_NEO_RBGW

#define EBOARD_NEO_RBGW   ((3 << 6) | (0 << 4) | (2 << 2) | (1))

Definition at line 2317 of file eBoard.h.

◆ EBOARD_NEO_RBWG

#define EBOARD_NEO_RBWG   ((2 << 6) | (0 << 4) | (3 << 2) | (1))

Definition at line 2315 of file eBoard.h.

◆ EBOARD_NEO_RGB

#define EBOARD_NEO_RGB   ((0 << 6) | (0 << 4) | (1 << 2) | (2))

Definition at line 2281 of file eBoard.h.

◆ EBOARD_NEO_RGBW

#define EBOARD_NEO_RGBW   ((3 << 6) | (0 << 4) | (1 << 2) | (2))

Definition at line 2313 of file eBoard.h.

◆ EBOARD_NEO_RGWB

#define EBOARD_NEO_RGWB   ((2 << 6) | (0 << 4) | (1 << 2) | (3))

Definition at line 2311 of file eBoard.h.

◆ EBOARD_NEO_RWBG

#define EBOARD_NEO_RWBG   ((1 << 6) | (0 << 4) | (3 << 2) | (2))

Definition at line 2309 of file eBoard.h.

◆ EBOARD_NEO_RWGB

#define EBOARD_NEO_RWGB   ((1 << 6) | (0 << 4) | (2 << 2) | (3))

Definition at line 2307 of file eBoard.h.

◆ EBOARD_NEO_WBGR

#define EBOARD_NEO_WBGR   ((0 << 6) | (3 << 4) | (2 << 2) | (1))

Definition at line 2305 of file eBoard.h.

◆ EBOARD_NEO_WBRG

#define EBOARD_NEO_WBRG   ((0 << 6) | (2 << 4) | (3 << 2) | (1))

Definition at line 2303 of file eBoard.h.

◆ EBOARD_NEO_WGBR

#define EBOARD_NEO_WGBR   ((0 << 6) | (3 << 4) | (1 << 2) | (2))

Definition at line 2301 of file eBoard.h.

◆ EBOARD_NEO_WGRB

#define EBOARD_NEO_WGRB   ((0 << 6) | (2 << 4) | (1 << 2) | (3))

Definition at line 2299 of file eBoard.h.

◆ EBOARD_NEO_WRBG

#define EBOARD_NEO_WRBG   ((0 << 6) | (1 << 4) | (3 << 2) | (2))

Definition at line 2297 of file eBoard.h.

◆ EBOARD_NEO_WRGB

#define EBOARD_NEO_WRGB   ((0 << 6) | (1 << 4) | (2 << 2) | (3))

Definition at line 2295 of file eBoard.h.

◆ EBOARD_PWM_SPE

#define EBOARD_PWM_SPE   1

Definition at line 732 of file eBoard.h.

Referenced by ISR().

◆ EBOARD_SHIFT_REGISTER

#define EBOARD_SHIFT_REGISTER   0x1

Definition at line 39 of file eBoard.h.

◆ EBOARD_SPI_SERVO_MAX

#define EBOARD_SPI_SERVO_MAX   2

◆ EBOARD_USE_RESET

#define EBOARD_USE_RESET   0x1

Definition at line 770 of file eBoard.h.

◆ EBOARD_USE_SPI

#define EBOARD_USE_SPI   0x1

Definition at line 549 of file eBoard.h.

◆ EBOARD_USE_UTILITY

#define EBOARD_USE_UTILITY   0x1

Definition at line 721 of file eBoard.h.

◆ EBOARD_VERSION

#define EBOARD_VERSION   "3.0c"

Definition at line 9 of file eBoard.h.

◆ FREQ_HIGH

#define FREQ_HIGH   0xB

Definition at line 1717 of file eBoard.h.

◆ FREQ_LOW

#define FREQ_LOW   0xA

Definition at line 1715 of file eBoard.h.

◆ GCC_VERSION

#define GCC_VERSION   (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)

Definition at line 835 of file eBoard.h.

◆ HIGHSPEED

#define HIGHSPEED

Definition at line 51 of file eBoard.h.

◆ INVALID_SERVO

#define INVALID_SERVO   255

Definition at line 3571 of file eBoard.h.

Referenced by Servo::readMicroseconds(), and Servo::Servo().

◆ LCD_COMMAND_BLACK_BACKGROUND

#define LCD_COMMAND_BLACK_BACKGROUND   0xA6

Definition at line 2065 of file eBoard.h.

Referenced by LCD::changeBackground().

◆ LCD_COMMAND_CHARGE_PUMP_ENABLE

#define LCD_COMMAND_CHARGE_PUMP_ENABLE   0x14

Definition at line 2078 of file eBoard.h.

Referenced by LCD::init().

◆ LCD_COMMAND_CHARGE_PUMP_SETTING

#define LCD_COMMAND_CHARGE_PUMP_SETTING   0x8d

Definition at line 2076 of file eBoard.h.

Referenced by LCD::init().

◆ LCD_COMMAND_DISPLAY_OFF

#define LCD_COMMAND_DISPLAY_OFF   0xAE

Definition at line 2061 of file eBoard.h.

Referenced by LCD::changeMode().

◆ LCD_COMMAND_DISPLAY_ON

#define LCD_COMMAND_DISPLAY_ON   0xAF

Definition at line 2063 of file eBoard.h.

Referenced by LCD::changeMode().

◆ LCD_COMMAND_MODE

#define LCD_COMMAND_MODE   0x80

Definition at line 2057 of file eBoard.h.

Referenced by LCD::s1Cmd().

◆ LCD_COMMAND_SET_BRIGHTNESS

#define LCD_COMMAND_SET_BRIGHTNESS   0x81

Definition at line 2069 of file eBoard.h.

◆ LCD_COMMAND_WHITE_BACKGROUND

#define LCD_COMMAND_WHITE_BACKGROUND   0xA7

Definition at line 2067 of file eBoard.h.

Referenced by LCD::changeBackground().

◆ LCD_DATA_MODE

#define LCD_DATA_MODE   0x40

Definition at line 2059 of file eBoard.h.

Referenced by LCD::s1Dat().

◆ LCD_HEIGHT

#define LCD_HEIGHT   64

Definition at line 2085 of file eBoard.h.

Referenced by LCD::print().

◆ LCD_HORIZONTAL_ADDRESSING

#define LCD_HORIZONTAL_ADDRESSING   0x00

Definition at line 2073 of file eBoard.h.

◆ LCD_PAGE_ADDRESSING

#define LCD_PAGE_ADDRESSING   0x02

Definition at line 2071 of file eBoard.h.

Referenced by LCD::init().

◆ LCD_WIDTH

#define LCD_WIDTH   128

Definition at line 2081 of file eBoard.h.

Referenced by LCD::print().

◆ MACRO_MSG

#define MACRO_MSG (   mac,
  str 
)    PPERFORM_PRAGMA(message("You set " #mac " to " VALUE(mac) ": " #str))

Definition at line 18 of file eBoard.h.

◆ main

#define main   eVirtual_main

Definition at line 68 of file eBoard.h.

◆ MAX_PULSE_WIDTH

#define MAX_PULSE_WIDTH   2400

Definition at line 3566 of file eBoard.h.

Referenced by Servo::attach().

◆ MAX_SERVOS

#define MAX_SERVOS   (_Nbr_16timers * SERVOS_PER_TIMER)

Definition at line 3570 of file eBoard.h.

Referenced by Servo::attach(), Servo::Servo(), and Servo::writeMicroseconds().

◆ MIN_PULSE_WIDTH

#define MIN_PULSE_WIDTH   544

Definition at line 3565 of file eBoard.h.

Referenced by Servo::attach(), and Servo::write().

◆ PIN_BLUETOOTH_RX

#define PIN_BLUETOOTH_RX   0x13

Definition at line 789 of file eBoard.h.

Referenced by __assert(), checkIdx(), and setup().

◆ PIN_BLUETOOTH_STATE

#define PIN_BLUETOOTH_STATE   0x13

Definition at line 781 of file eBoard.h.

Referenced by isConnected(), and setup().

◆ PIN_BLUETOOTH_TX

#define PIN_BLUETOOTH_TX   0x12

Definition at line 797 of file eBoard.h.

Referenced by __assert(), and checkIdx().

◆ PIN_MAX

#define PIN_MAX   0x32

Definition at line 80 of file eBoard.h.

Referenced by checkIdx().

◆ PIN_MOTOR_DIR

#define PIN_MOTOR_DIR   0x4

Definition at line 804 of file eBoard.h.

Referenced by __assert(), SoccerBoard::motor(), setup(), and I2CInOut::write().

◆ PIN_MOTOR_SPE

#define PIN_MOTOR_SPE   0x5

Definition at line 808 of file eBoard.h.

Referenced by __assert(), setup(), and trig_rept_task().

◆ PIN_SHIFT_CLK

#define PIN_SHIFT_CLK   0x6

Definition at line 812 of file eBoard.h.

Referenced by setup(), and shiftAll().

◆ PIN_SHIFT_DAT

#define PIN_SHIFT_DAT   0x7

Definition at line 816 of file eBoard.h.

Referenced by setup(), and shiftAll().

◆ PIN_SHIFT_LAT

#define PIN_SHIFT_LAT   0x8

Definition at line 820 of file eBoard.h.

Referenced by setup(), and shiftAll().

◆ PPERFORM_PRAGMA

#define PPERFORM_PRAGMA (   str)    _Pragma(#str)

Definition at line 15 of file eBoard.h.

◆ PWM_FAST

#define PWM_FAST   0x9

Definition at line 1713 of file eBoard.h.

◆ PWM_SLOW

#define PWM_SLOW   0x8

Definition at line 1711 of file eBoard.h.

◆ REFRESH_INTERVAL

#define REFRESH_INTERVAL   20000

Definition at line 3568 of file eBoard.h.

Referenced by handle_interrupts().

◆ REPT_TASK

#define REPT_TASK

Definition at line 43 of file eBoard.h.

◆ sbi

#define sbi (   sfr,
  bit 
)    (_SFR_BYTE(sfr) |= _BV(bit))

Definition at line 111 of file eBoard.h.

◆ SERVO

#define SERVO (   _timer,
  _channel 
)    (servos[SERVO_INDEX(_timer,_channel)])

Definition at line 3607 of file eBoard.h.

Referenced by handle_interrupts(), and isTimerActive().

◆ SERVO_INDEX

#define SERVO_INDEX (   _timer,
  _channel 
)    ((_timer*SERVOS_PER_TIMER) + _channel)

Definition at line 3606 of file eBoard.h.

Referenced by handle_interrupts().

◆ SERVO_INDEX_TO_CHANNEL

#define SERVO_INDEX_TO_CHANNEL (   _servo_nbr)    (_servo_nbr % SERVOS_PER_TIMER)

Definition at line 3605 of file eBoard.h.

◆ SERVO_INDEX_TO_TIMER

#define SERVO_INDEX_TO_TIMER (   _servo_nbr)    ((timer16_Sequence_t)(_servo_nbr / SERVOS_PER_TIMER))

Definition at line 3604 of file eBoard.h.

Referenced by Servo::attach(), and Servo::detach().

◆ SERVO_MAX

#define SERVO_MAX ( )    (MAX_PULSE_WIDTH - this->max * 4)

Definition at line 3609 of file eBoard.h.

Referenced by Servo::read(), Servo::write(), and Servo::writeMicroseconds().

◆ SERVO_MIN

#define SERVO_MIN ( )    (MIN_PULSE_WIDTH - this->min * 4)

Definition at line 3608 of file eBoard.h.

Referenced by Servo::read(), Servo::write(), and Servo::writeMicroseconds().

◆ SERVOS_PER_TIMER

#define SERVOS_PER_TIMER   12

Definition at line 3569 of file eBoard.h.

Referenced by handle_interrupts(), and isTimerActive().

◆ SPI_2XCLOCK_MASK

#define SPI_2XCLOCK_MASK   0x01

Definition at line 583 of file eBoard.h.

Referenced by eagle_impl::SPIClass::setClockDivider().

◆ SPI_CLOCK_DIV128

#define SPI_CLOCK_DIV128   0x03

Definition at line 563 of file eBoard.h.

◆ SPI_CLOCK_DIV16

#define SPI_CLOCK_DIV16   0x01

Definition at line 559 of file eBoard.h.

◆ SPI_CLOCK_DIV2

#define SPI_CLOCK_DIV2   0x04

Definition at line 565 of file eBoard.h.

◆ SPI_CLOCK_DIV32

#define SPI_CLOCK_DIV32   0x06

Definition at line 569 of file eBoard.h.

◆ SPI_CLOCK_DIV4

#define SPI_CLOCK_DIV4   0x00

Definition at line 557 of file eBoard.h.

◆ SPI_CLOCK_DIV64

#define SPI_CLOCK_DIV64   0x02

Definition at line 561 of file eBoard.h.

◆ SPI_CLOCK_DIV8

#define SPI_CLOCK_DIV8   0x05

Definition at line 567 of file eBoard.h.

Referenced by ServoCds55::begin().

◆ SPI_CLOCK_MASK

#define SPI_CLOCK_MASK   0x03

Definition at line 581 of file eBoard.h.

Referenced by eagle_impl::SPIClass::setClockDivider().

◆ SPI_MODE0

#define SPI_MODE0   0x00

Definition at line 571 of file eBoard.h.

◆ SPI_MODE1

#define SPI_MODE1   0x04

Definition at line 573 of file eBoard.h.

◆ SPI_MODE2

#define SPI_MODE2   0x08

Definition at line 575 of file eBoard.h.

◆ SPI_MODE3

#define SPI_MODE3   0x0C

Definition at line 577 of file eBoard.h.

◆ SPI_MODE_MASK

#define SPI_MODE_MASK   0x0C

Definition at line 579 of file eBoard.h.

Referenced by eagle_impl::SPIClass::setDataMode().

◆ ticksToUs

#define ticksToUs (   _ticks)    (( (unsigned)_ticks * 8)/ clockCyclesPerMicrosecond() )

Definition at line 3597 of file eBoard.h.

Referenced by Servo::readMicroseconds().

◆ TRIM_DURATION

#define TRIM_DURATION   2

Definition at line 3598 of file eBoard.h.

Referenced by Servo::readMicroseconds(), and Servo::writeMicroseconds().

◆ TWI_BUFFER_LENGTH

#define TWI_BUFFER_LENGTH   32

Definition at line 96 of file eBoard.h.

Referenced by ISR(), twi_readFrom(), twi_transmit(), and twi_writeTo().

◆ TWI_FREQ

#define TWI_FREQ   100000L

Definition at line 93 of file eBoard.h.

Referenced by twi_init().

◆ twi_h

#define twi_h

Definition at line 90 of file eBoard.h.

◆ TWI_MRX

#define TWI_MRX   1

Definition at line 99 of file eBoard.h.

Referenced by twi_readFrom().

◆ TWI_MTX

#define TWI_MTX   2

Definition at line 100 of file eBoard.h.

Referenced by twi_writeTo().

◆ TWI_READY

#define TWI_READY   0

Definition at line 98 of file eBoard.h.

Referenced by ISR(), twi_init(), twi_readFrom(), twi_releaseBus(), twi_stop(), and twi_writeTo().

◆ TWI_SRX

#define TWI_SRX   3

Definition at line 101 of file eBoard.h.

Referenced by ISR().

◆ TWI_STX

#define TWI_STX   4

Definition at line 102 of file eBoard.h.

Referenced by ISR(), and twi_transmit().

◆ usToTicks

#define usToTicks (   _us)    (( clockCyclesPerMicrosecond()* _us) / 8)

Definition at line 3596 of file eBoard.h.

Referenced by handle_interrupts(), Servo::Servo(), and Servo::writeMicroseconds().

◆ VALUE

#define VALUE (   x)    VALUE_TO_STRING(x)

Definition at line 11 of file eBoard.h.

◆ VALUE_TO_STRING

#define VALUE_TO_STRING (   x)    #x

Definition at line 10 of file eBoard.h.

Typedef Documentation

◆ DELAY_TABLE

typedef struct _DELAY_TABLE DELAY_TABLE

◆ optVAL_t

typedef int optVAL_t

Definition at line 648 of file eBoard.h.

Enumeration Type Documentation

◆ timer16_Sequence_t

Enumerator
_timer1 
_Nbr_16timers 

Definition at line 3564 of file eBoard.h.

Function Documentation

◆ __assert()

void __assert ( const char *  __func,
const char *  __file,
optVAL_t  __lineno,
const char *  __sexp 
)

[DEBUG_MODE] custom assert message

Parameters
__functhe function name
__filethe file name
__linenothe line number
__sexpthe expression
Note
Example output when using a not-allowed pin:
Error with: checkIdx in /home/eagleoutice/Dokumente/proj/_sia/src/eBoard.h
        >>idx>0x1 && idx < 0xA
    This happens if an out of bounds exception
    has occured. Following pins shouldn't be used:
    D2&D3 : Used for Bluetooth communication
    D4&D5 : Used for main motor control
    D10-13: Used for smart-servo-shield

Definition at line 1267 of file eBoard.h.

References PIN_BLUETOOTH_RX, PIN_BLUETOOTH_TX, PIN_MOTOR_DIR, and PIN_MOTOR_SPE.

1267  {
1268  Serial.print("Error with: "); Serial.print(__func);
1269  Serial.print(" in "); Serial.print(__file);
1270  Serial.print(" >>");
1271  Serial.println(__sexp);
1272  if(strcmp(__func,"checkIdx")==0){
1273  Serial.println(" This happens if an out of bounds exception");
1274  Serial.println(" has occured. Following pins shouldn't be used:");
1275  Serial.print(" D" + PIN_BLUETOOTH_RX);Serial.print("&");
1276  Serial.print("D");Serial.print(PIN_BLUETOOTH_TX);
1277  Serial.println(" : Used for Bluetooth communication");
1278  Serial.print(" D");Serial.print(PIN_MOTOR_DIR);Serial.print("&");
1279  Serial.print("D");Serial.print(PIN_MOTOR_SPE);
1280  Serial.println(" : Used for main motor control");
1281  #if EBOARD_USE_SPI > 0x0
1282  Serial.print(" D10-13");
1283  Serial.println(": Used for smart-servo-shield");
1284  #endif
1285  } else if (strcmp(__func,"readPin")==0){
1286  Serial.println("You've tried to access an analogPin that isn't present on the board you're currently working on!");
1287  }
1288  Serial.flush();
1289  abort(); // halt after outputting information
1290  }
#define PIN_BLUETOOTH_RX
Definition: eBoard.h:789
#define PIN_MOTOR_DIR
Definition: eBoard.h:804
#define PIN_BLUETOOTH_TX
Definition: eBoard.h:797
#define PIN_MOTOR_SPE
Definition: eBoard.h:808

◆ _Pragma() [1/19]

_Pragma ( )

◆ _Pragma() [2/19]

_Pragma ( )

◆ _Pragma() [3/19]

_Pragma ( )

◆ _Pragma() [4/19]

_Pragma ( )

◆ _Pragma() [5/19]

_Pragma ( )

◆ _Pragma() [6/19]

_Pragma ( )

◆ _Pragma() [7/19]

_Pragma ( )

◆ _Pragma() [8/19]

_Pragma ( )

◆ _Pragma() [9/19]

_Pragma ( )

◆ _Pragma() [10/19]

_Pragma ( )

◆ _Pragma() [11/19]

_Pragma ( )

◆ _Pragma() [12/19]

_Pragma ( )

◆ _Pragma() [13/19]

_Pragma ( )

◆ _Pragma() [14/19]

_Pragma ( )

◆ _Pragma() [15/19]

_Pragma ( )

◆ _Pragma() [16/19]

_Pragma ( )

◆ _Pragma() [17/19]

_Pragma ( )

◆ _Pragma() [18/19]

_Pragma ( )

◆ _Pragma() [19/19]

_Pragma ( )

◆ _serial()

SoftwareSerial _serial ( 0x13  ,
0x12   
)

Referenced by checkOverflow(), readVal(), setup(), and writeVal().

+ Here is the caller graph for this function:

◆ checkIdx()

void checkIdx ( optVAL_t  idx)
inline

[DEBUG_MODE] used to check if a pin index is in bounds

Note
if not, an assert-error will be raised
Parameters
idxthe index of the pin to check
Returns
nothing, blocks on error

Definition at line 1296 of file eBoard.h.

References PIN_BLUETOOTH_RX, PIN_BLUETOOTH_TX, and PIN_MAX.

Referenced by checkPin(), readPin(), setPin(), and writePin().

1296  {
1297  #if EBOARD_DEBUG_MODE > 0x0
1298  assert(idx>=0x0 && idx < PIN_MAX); //changed pins? change me! (didn't want to use macros)
1299  assert(idx!=PIN_BLUETOOTH_RX&&idx!=PIN_BLUETOOTH_TX);
1300  #endif
1301  }
#define PIN_MAX
Definition: eBoard.h:80
#define PIN_BLUETOOTH_RX
Definition: eBoard.h:789
#define PIN_BLUETOOTH_TX
Definition: eBoard.h:797
+ Here is the caller graph for this function:

◆ checkOverflow()

bool checkOverflow ( void  )
inline

[BLUETOOTH] checks if theres a lack of Data!

Note
if this happens you should consider to lower the sending or faster the receiving rate ;)
Returns
true if the overflow has happened
false if used on MEGA with default pins as there is no hardware based buffer control :/
false if there is no overflow (recognized)

Definition at line 1368 of file eBoard.h.

References _serial(), and eagle_impl::SoftwareSerial::overflow().

1368  {
1369  #if (EBOARD_BLUETOOTH > 0x0) && (((PIN_BLUETOOTH_RX==0x13) && (PIN_BLUETOOTH_TX==0x12)) && defined(__AVR_ATmega2560__))
1370  return false; //there is no hardware provided control for hardwareserial overflow
1371  #else
1372  return (_serial.overflow());
1373  #endif
1374  }
SoftwareSerial _serial(0x13, 0x12)
+ Here is the call graph for this function:

◆ checkPin()

bool checkPin ( optVAL_t  idx,
optVAL_t  mode = 0x1 
)
inline

[COPY&PASTE] [CHECK_PINS] Check if a pin is set to a specific mode

Note
this is no hardware test... this test is based on hard coded data
Parameters
idxthe index of the pin to check
modethe mode the pin should be checked for
Returns
true if the pin is in the requested mode

๐Ÿ”ง I prevent errors!

Definition at line 1332 of file eBoard.h.

References checkIdx(), pin_in, and pin_out.

Referenced by readPin(), and writePin().

1332  {
1333  checkIdx(idx);
1334  return (mode == OUTPUT)? ((pin_out & (1<<idx))>0x0):((pin_in & (1<<idx))>0x0);
1335  }
uint64_t pin_out
Definition: eBoard.h:1321
uint64_t pin_in
Definition: eBoard.h:1327
void checkIdx(optVAL_t idx)
[DEBUG_MODE] used to check if a pin index is in bounds
Definition: eBoard.h:1296
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ countSetBits()

optVAL_t countSetBits ( optVAL_t  x)

[COPY&PASTE] [CHECK_PWM] counts high-bits in an int/byte (determined by IGNORE_SIZE)

Parameters
xthe number to check
Returns
the amount of high-bits

Definition at line 1308 of file eBoard.h.

1308  {
1309  optVAL_t count; //dont't want to overuse global space^^
1310  for (count = 0; x; count++)
1311  x &= x - 1;
1312  return count;
1313  }
int optVAL_t
Definition: eBoard.h:648

◆ DebugPulse()

void DebugPulse ( uint8_t  pin,
uint8_t  count 
)
inline

Definition at line 999 of file eBoard.h.

Referenced by eagle_impl::SoftwareSerial::recv().

999  {
1000  #if _DEBUG
1001  volatile uint8_t *pport = portOutputRegister(digitalPinToPort(pin));
1002  uint8_t val = *pport;
1003  while (count--)
1004  {
1005  *pport = val | digitalPinToBitMask(pin);
1006  *pport = val;
1007  }
1008  #endif
1009  }
+ Here is the caller graph for this function:

◆ eVirtual_main()

int eVirtual_main ( )

Referenced by setup().

+ Here is the caller graph for this function:

◆ finISR()

static void finISR ( timer16_Sequence_t  timer)
static

Definition at line 3662 of file eBoard.h.

References _timer1.

Referenced by Servo::detach().

3662  {
3663  #if defined WIRING // Wiring
3664  if(timer == _timer1) {
3665  TIMSK &= ~_BV(OCIE1A) ; // disable timer 1 output compare interrupt
3666  timerDetach(TIMER1OUTCOMPAREA_INT);
3667  }
3668  else if(timer == _timer3) {
3669  ETIMSK &= ~_BV(OCIE3A); // disable the timer3 output compare A interrupt
3670  timerDetach(TIMER3OUTCOMPAREA_INT);
3671  }
3672  #else
3673  //For arduino - in future: call here to a currently undefined function to reset the timer
3674  (void) timer; // squash "unused parameter 'timer' [-Wunused-parameter]" warning
3675  #endif
3676  }
+ Here is the caller graph for this function:

◆ handle_interrupts()

static void handle_interrupts ( timer16_Sequence_t  timer,
volatile uint16_t *  TCNTn,
volatile uint16_t *  OCRnA 
)
inlinestatic

Definition at line 3610 of file eBoard.h.

References Channel, REFRESH_INTERVAL, SERVO, SERVO_INDEX, ServoCount, SERVOS_PER_TIMER, and usToTicks.

Referenced by SIGNAL().

3611  {
3612  if( Channel[timer] < 0 )
3613  *TCNTn = 0; // channel set to -1 indicated that refresh interval completed so reset the timer
3614  else{
3615  if( SERVO_INDEX(timer,Channel[timer]) < ServoCount && SERVO(timer,Channel[timer]).Pin.isActive == true )
3616  digitalWrite( SERVO(timer,Channel[timer]).Pin.nbr,LOW); // pulse this channel low if activated
3617  }
3618  Channel[timer]++; // increment to the next channel
3619  if( SERVO_INDEX(timer,Channel[timer]) < ServoCount && Channel[timer] < SERVOS_PER_TIMER) {
3620  *OCRnA = *TCNTn + SERVO(timer,Channel[timer]).ticks;
3621  if(SERVO(timer,Channel[timer]).Pin.isActive == true) // check if activated
3622  digitalWrite( SERVO(timer,Channel[timer]).Pin.nbr,HIGH); // its an active channel so pulse it high
3623  }
3624  else {
3625  // finished all channels so wait for the refresh period to expire before starting over
3626  if( ((unsigned)*TCNTn) + 4 < usToTicks(REFRESH_INTERVAL) ) // allow a few ticks to ensure the next OCR1A not missed
3627  *OCRnA = (unsigned int)usToTicks(REFRESH_INTERVAL);
3628  else
3629  *OCRnA = *TCNTn + 4; // at least REFRESH_INTERVAL has elapsed
3630  Channel[timer] = -1; // this will get incremented at the end of the refresh period to start again at the first channel
3631  }
3632  }
#define SERVO_INDEX(_timer, _channel)
Definition: eBoard.h:3606
static volatile int8_t Channel[_Nbr_16timers]
Definition: eBoard.h:3601
uint8_t ServoCount
Definition: eBoard.h:3602
#define SERVOS_PER_TIMER
Definition: eBoard.h:3569
#define REFRESH_INTERVAL
Definition: eBoard.h:3568
#define usToTicks(_us)
Definition: eBoard.h:3596
#define SERVO(_timer, _channel)
Definition: eBoard.h:3607
+ Here is the caller graph for this function:

◆ initISR()

static void initISR ( timer16_Sequence_t  timer)
static

Definition at line 3650 of file eBoard.h.

References _timer1.

Referenced by Servo::attach().

3650  {
3651  if(timer == _timer1) {
3652  TCCR1A = 0; // normal counting mode
3653  TCCR1B = _BV(CS11); // set prescaler of 8
3654  TCNT1 = 0; // clear the timer count
3655  TIFR1 |= _BV(OCF1A); // clear any pending interrupts;
3656  TIMSK1 |= _BV(OCIE1A) ; // enable the output compare interrupt
3657  #if defined(WIRING)
3658  timerAttach(TIMER1OUTCOMPAREA_INT, Timer1Service);
3659  #endif
3660  }
3661  }
+ Here is the caller graph for this function:

◆ isConnected()

bool isConnected ( void  )
inline

[BLUETOOTH] this will check if the HC-05 is paired

Returns
if PIN_BLUETOOTH_STATE != PIN_BLUETOOTH_RX:
    true if the HC-05 is paired
    false if the HC-05 is disconnected
if PIN_BLUETOOTH_STATE == PIN_BLUETOOTH_RX
    true in any case - because we don't know ^^

Definition at line 1390 of file eBoard.h.

References PIN_BLUETOOTH_STATE.

Referenced by RB14Scan::channel(), and RB14Scan::raw().

1390  {
1391  #if PIN_BLUETOOTH_RX != PIN_BLUETOOTH_STATE
1392  return digitalRead(PIN_BLUETOOTH_STATE);
1393  #else
1394  return true;
1395  #endif
1396  }
#define PIN_BLUETOOTH_STATE
Definition: eBoard.h:781
+ Here is the caller graph for this function:

◆ ISR() [1/2]

ISR ( TWI_vect  )

Definition at line 222 of file eBoard.h.

References TWI_BUFFER_LENGTH, twi_error, twi_inRepStart, twi_masterBuffer, twi_masterBufferIndex, twi_masterBufferLength, twi_onSlaveReceive, twi_onSlaveTransmit, TWI_READY, twi_releaseBus(), twi_reply(), twi_rxBuffer, twi_rxBufferIndex, twi_sendStop, twi_slarw, TWI_SRX, twi_state, twi_stop(), TWI_STX, twi_txBuffer, twi_txBufferIndex, and twi_txBufferLength.

222  {
223  switch(TW_STATUS){
224  case TW_START:
225  case TW_REP_START:
226  TWDR = twi_slarw;
227  twi_reply(1);
228  break;
229  case TW_MT_SLA_ACK:
230  case TW_MT_DATA_ACK:
233  twi_reply(1);
234  }else{
235  if (twi_sendStop) twi_stop();
236  else {
237  twi_inRepStart = true;
238  TWCR = _BV(TWINT) | _BV(TWSTA)| _BV(TWEN) ;
240  }
241  }
242  break;
243  case TW_MT_SLA_NACK:
244  twi_error = TW_MT_SLA_NACK;
245  twi_stop();
246  break;
247  case TW_MT_DATA_NACK:
248  twi_error = TW_MT_DATA_NACK;
249  twi_stop();
250  break;
251  case TW_MT_ARB_LOST:
252  twi_error = TW_MT_ARB_LOST;
253  twi_releaseBus();
254  break;
255  case TW_MR_DATA_ACK:
257  case TW_MR_SLA_ACK:
259  else twi_reply(0);
260  break;
261  case TW_MR_DATA_NACK:
263  if (twi_sendStop) twi_stop();
264  else {
265  twi_inRepStart = true;
266  TWCR = _BV(TWINT) | _BV(TWSTA)| _BV(TWEN) ;
268  }
269  break;
270  case TW_MR_SLA_NACK:
271  twi_stop();
272  break;
273  case TW_SR_SLA_ACK:
274  case TW_SR_GCALL_ACK:
275  case TW_SR_ARB_LOST_SLA_ACK:
276  case TW_SR_ARB_LOST_GCALL_ACK:
277  twi_state = TWI_SRX;
278  twi_rxBufferIndex = 0;
279  twi_reply(1);
280  break;
281  case TW_SR_DATA_ACK:
282  case TW_SR_GCALL_DATA_ACK:
285  twi_reply(1);
286  } else twi_reply(0);
287  break;
288  case TW_SR_STOP:
290  twi_stop();
292  twi_rxBufferIndex = 0;
293  twi_releaseBus();
294  break;
295  case TW_SR_DATA_NACK:
296  case TW_SR_GCALL_DATA_NACK:
297  twi_reply(0);
298  break;
299  case TW_ST_SLA_ACK:
300  case TW_ST_ARB_LOST_SLA_ACK:
301  twi_state = TWI_STX;
302  twi_txBufferIndex = 0;
303  twi_txBufferLength = 0;
305  if(0 == twi_txBufferLength){
306  twi_txBufferLength = 1;
307  twi_txBuffer[0] = 0x00;
308  }
309  case TW_ST_DATA_ACK:
312  else twi_reply(0);
313  break;
314  case TW_ST_DATA_NACK:
315  case TW_ST_LAST_DATA:
316  twi_reply(1);
318  break;
319  case TW_NO_INFO:
320  break;
321  case TW_BUS_ERROR:
322  twi_error = TW_BUS_ERROR;
323  twi_stop();
324  break;
325  }
326  }
static volatile uint8_t twi_inRepStart
Definition: eBoard.h:117
void twi_stop(void)
Definition: eBoard.h:213
void twi_releaseBus(void)
Definition: eBoard.h:218
static volatile uint8_t twi_masterBufferIndex
Definition: eBoard.h:121
static void(* twi_onSlaveTransmit)(void)
Definition: eBoard.h:118
static void(* twi_onSlaveReceive)(uint8_t *, int)
Definition: eBoard.h:119
static volatile uint8_t twi_slarw
Definition: eBoard.h:115
static volatile uint8_t twi_masterBufferLength
Definition: eBoard.h:122
static volatile uint8_t twi_txBufferIndex
Definition: eBoard.h:124
#define TWI_STX
Definition: eBoard.h:102
#define TWI_SRX
Definition: eBoard.h:101
static volatile uint8_t twi_txBufferLength
Definition: eBoard.h:125
#define TWI_READY
Definition: eBoard.h:98
static uint8_t twi_masterBuffer[32]
Definition: eBoard.h:120
static volatile uint8_t twi_error
Definition: eBoard.h:128
static volatile uint8_t twi_sendStop
Definition: eBoard.h:116
#define TWI_BUFFER_LENGTH
Definition: eBoard.h:96
static volatile uint8_t twi_rxBufferIndex
Definition: eBoard.h:127
void twi_reply(uint8_t ack)
Definition: eBoard.h:206
static volatile uint8_t twi_state
Definition: eBoard.h:114
static uint8_t twi_txBuffer[32]
Definition: eBoard.h:123
static uint8_t twi_rxBuffer[32]
Definition: eBoard.h:126
+ Here is the call graph for this function:

◆ ISR() [2/2]

ISR ( TIMER2_OVF_vect  )

Definition at line 3777 of file eBoard.h.

References EBOARD_PWM_SPE, timer_count, timer_ofl, and trig_rept_task().

3777  {
3778  timer_count++;
3779  if(timer_count >= EBOARD_PWM_SPE*1000 && !timer_ofl){
3780  timer_ofl = true;
3781  timer_count -= EBOARD_PWM_SPE*1000;
3782  trig_rept_task();
3783  timer_ofl = false;
3784  }
3785  TCNT2 = 256 - (int)((float)F_CPU * 0.001 / 64);
3786  }
#define EBOARD_PWM_SPE
Definition: eBoard.h:732
bool timer_ofl
Definition: eBoard.h:3776
int timer_count
Definition: eBoard.h:3775
void trig_rept_task()
Definition: eBoard.h:3763
+ Here is the call graph for this function:

◆ isTimerActive()

static boolean isTimerActive ( timer16_Sequence_t  timer)
static

Definition at line 3677 of file eBoard.h.

References SERVO, and SERVOS_PER_TIMER.

Referenced by Servo::attach(), and Servo::detach().

3677  {
3678  // returns true if any servo is active on this timer
3679  for(uint8_t channel=0; channel < SERVOS_PER_TIMER; channel++) {
3680  if(SERVO(timer,channel).Pin.isActive == true)
3681  return true;
3682  }
3683  return false;
3684  }
#define SERVOS_PER_TIMER
Definition: eBoard.h:3569
#define SERVO(_timer, _channel)
Definition: eBoard.h:3607
+ Here is the caller graph for this function:

◆ loop()

void loop ( void  )

[COPY&PASTE] As we have an Arduino we need a setup function ;)

Definition at line 3866 of file eBoard.h.

Referenced by NeoPixel::show().

3866  {
3867  //shall be empty
3868  }
+ Here is the caller graph for this function:

◆ pingI2C()

void pingI2C ( optVAL_t  ret[],
optVAL_t  ret_len 
)
inline

Sends a byte to a certain IยฒC-Device.

Note
Using IยฒC won't block the analog pins!
Parameters
retan array of optVAL_t
ret_lenthe length of the array

Definition at line 1923 of file eBoard.h.

References eagle_impl::TwoWire::beginTransmission(), eagle_impl::TwoWire::endTransmission(), STOP, and Wire.

1923  {
1924  optVAL_t count = 0;
1925  for (byte i = 1; (i < 255 && !STOP); i++) {
1926  if(i==200)continue; //internal
1927  Wire.beginTransmission (i);
1928  if (Wire.endTransmission () == 0) {
1929  if(count < ret_len) ret[count] = i;
1930  count++;
1931  delay (1);
1932  }
1933  }
1934  }
uint8_t endTransmission(void)
Definition: eBoard.h:470
TwoWire Wire
Definition: eBoard.h:543
int optVAL_t
Definition: eBoard.h:648
static bool STOP
Definition: eBoard.h:641
void beginTransmission(uint8_t address)
Definition: eBoard.h:454
+ Here is the call graph for this function:

◆ readI2C()

void readI2C ( optVAL_t  deviceID,
optVAL_t  ret[],
optVAL_t  ret_len,
bool  blocking = true 
)
inline

Reads a special amount of bits from a certain IยฒC-Device.

Note
Using IยฒC won't block the analog pins!
Parameters
deviceIDthe target device
retthe buffer to send
ret_lensize of buffer
blockingshould the Arduino wait until there is Data?

Definition at line 1949 of file eBoard.h.

References eagle_impl::TwoWire::available(), eagle_impl::TwoWire::read(), STOP, and Wire.

1949  {
1950  for(optVAL_t rect = 0x0; (Wire.available() || (((blocking && (rect < ret_len))) && (!STOP))); rect++)
1951  ret[rect] = Wire.read();
1952  }
TwoWire Wire
Definition: eBoard.h:543
virtual int read(void)
Definition: eBoard.h:500
int optVAL_t
Definition: eBoard.h:648
static bool STOP
Definition: eBoard.h:641
virtual int available(void)
Definition: eBoard.h:497
+ Here is the call graph for this function:

◆ readPin()

optVAL_t readPin ( optVAL_t  idx,
bool  dig = true 
)
inline

read a digital state from an INPUTpin

Note
this will automatically call setPin if COPY&PASTE
Parameters
idxthe index of the pin to use
digdetermines if the value should be from the digital or the analog pins
Returns
the read value as optVAL_t

Definition at line 1460 of file eBoard.h.

References checkIdx(), checkPin(), and setPin().

Referenced by SoccerBoard::analog(), and SoccerBoard::digital().

1460  {
1461  #if EBOARD_CHECK_PINS > 0x0
1462  if(dig) checkIdx(idx);
1463  #if defined (__AVR_ATmega2560__)
1464  else if (idx<0||idx>0xF){ //use I2C? change => Wire
1465  #else
1466  else if (idx<0||idx>0x7){ //use I2C? change => Wire
1467  #endif
1468  #if EBOARD_DEBUG_MODE > 0x0
1469  assert(false);
1470  #endif
1471  return 0;
1472  }
1473  if(dig && !checkPin(idx,INPUT))
1474  #endif
1475  #if EBOARD_COPY_AND_PASTE > 0x0
1476  setPin(idx,INPUT);
1477  #else
1478  pinMode(idx,INPUT);
1479  #endif
1480  return((dig)? digitalRead(idx) : analogRead(idx));
1481  }
bool checkPin(optVAL_t idx, optVAL_t mode=0x1)
[COPY&PASTE] [CHECK_PINS] Check if a pin is set to a specific mode
Definition: eBoard.h:1332
void setPin(optVAL_t idx, optVAL_t mode=0x1)
[COPY&PASTE] set a pin to a certain mode => checkPin() will return true then
Definition: eBoard.h:1341
void checkIdx(optVAL_t idx)
[DEBUG_MODE] used to check if a pin index is in bounds
Definition: eBoard.h:1296
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readVal()

char readVal ( char  oF = '.')
inline

[BLUETOOTH] reads a single value from bluetooth if available!

Parameters
oFthe character returned on failure
Returns
the character read. Returns {oF} on failure!

Definition at line 1375 of file eBoard.h.

References _serial(), eagle_impl::SoftwareSerial::available(), and eagle_impl::SoftwareSerial::read().

Referenced by RB14Scan::channel().

1375  {
1376  #if (EBOARD_BLUETOOTH > 0x0) && (((PIN_BLUETOOTH_RX==0x13) && (PIN_BLUETOOTH_TX==0x12)) && defined(__AVR_ATmega2560__))
1377  return ((Serial1.available())?(Serial1.read()):(oF));
1378  #else
1379  return ((_serial.available())?(_serial.read()):(oF));
1380  #endif
1381  }
virtual int available(void)
Definition: eBoard.h:1202
SoftwareSerial _serial(0x13, 0x12)
virtual int read(void)
Definition: eBoard.h:1193
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rept_task()

void rept_task ( void  )

Referenced by trig_rept_task().

+ Here is the caller graph for this function:

◆ sendI2C() [1/2]

optVAL_t sendI2C ( optVAL_t  deviceID,
byte *  buf,
byte  buf_len 
)
inline

Sends a buffer of bytes to a certain IยฒC-Device.

Note
Using IยฒC won't block the analog pins!
Parameters
deviceIDthe target device
bufthe buffer to send
buf_lensize of buffer
Returns
0 Transmission went well :D
1 ERROR: data too long for transmit buffer
2 ERROR: NACK transmitting address
3 ERROR: NACK transmitting data
4 ERROR: UNKNOWN

Definition at line 1935 of file eBoard.h.

References eagle_impl::TwoWire::beginTransmission(), buf, eagle_impl::TwoWire::endTransmission(), Wire, and eagle_impl::TwoWire::write().

1935  {
1936  Wire.beginTransmission(deviceID);
1937  Wire.write(buf,buf_len);
1938  return Wire.endTransmission();
1939  }
uint8_t endTransmission(void)
Definition: eBoard.h:470
const unsigned char * buf[11]
to enable &#39;smooth&#39; access (:
TwoWire Wire
Definition: eBoard.h:543
virtual size_t write(uint8_t data)
Definition: eBoard.h:473
void beginTransmission(uint8_t address)
Definition: eBoard.h:454
+ Here is the call graph for this function:

◆ sendI2C() [2/2]

optVAL_t sendI2C ( optVAL_t  deviceID,
byte  buf 
)
inline

Sends a byte to a certain I2C-Device.

Note
Using I2C won't block the analog pins!
Parameters
deviceIDthe target device
bufthe buffer to send
Returns
0 Transmission went well :D
1 ERROR: data too long for transmit buffer
2 ERROR: NACK transmitting address
3 ERROR: NACK transmitting data
4 ERROR: UNKNOWN

Definition at line 1940 of file eBoard.h.

References eagle_impl::TwoWire::beginTransmission(), buf, eagle_impl::TwoWire::endTransmission(), Wire, and eagle_impl::TwoWire::write().

1940  {
1941  Wire.beginTransmission(deviceID);
1942  Wire.write(buf);
1943  return Wire.endTransmission();
1944  }
uint8_t endTransmission(void)
Definition: eBoard.h:470
const unsigned char * buf[11]
to enable &#39;smooth&#39; access (:
TwoWire Wire
Definition: eBoard.h:543
virtual size_t write(uint8_t data)
Definition: eBoard.h:473
void beginTransmission(uint8_t address)
Definition: eBoard.h:454
+ Here is the call graph for this function:

◆ set_motor_speed()

void set_motor_speed ( optVAL_t  spe)
inline

Definition at line 3873 of file eBoard.h.

References Servo::write().

3873  {
3874  if(spe < 0 || spe > 180) return;
3875  mainMotor.write(spe);
3876  }
+ Here is the call graph for this function:

◆ set_steer_angle()

void set_steer_angle ( optVAL_t  ang)
inline

Definition at line 3878 of file eBoard.h.

References Servo::write().

3878  {
3879  if(ang < 0 || ang > 180) return;
3880  steerMotor.write(ang);
3881  }
+ Here is the call graph for this function:

◆ setPin()

void setPin ( optVAL_t  idx,
optVAL_t  mode = 0x1 
)

[COPY&PASTE] set a pin to a certain mode => checkPin() will return true then

Parameters
idxthe index of the pin to set
modethe mode the pin should be set to

Definition at line 1341 of file eBoard.h.

References checkIdx(), pin_in, and pin_out.

Referenced by SoccerBoard::motor(), readPin(), setup(), I2CInOut::write(), and writePin().

1341  {
1342  #if EBOARD_CHECK_PINS > 0x0
1343  checkIdx(idx);
1344  if(mode==OUTPUT) { //possible to read from OUTPUT digital ... we won't do it
1345  pin_out |= (1<<idx);
1346  pin_in &= ~(1<<idx);
1347  }
1348  else {
1349  pin_in |= (1<<idx);
1350  pin_out &= ~(1<<idx);
1351  }
1352  #endif
1353  pinMode(idx, mode);
1354  }
uint64_t pin_out
Definition: eBoard.h:1321
uint64_t pin_in
Definition: eBoard.h:1327
void checkIdx(optVAL_t idx)
[DEBUG_MODE] used to check if a pin index is in bounds
Definition: eBoard.h:1296
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setup()

void setup ( void  )

this is a guard

[COPY&PASTE] As we have an Arduino we need a setup function ;)

Definition at line 3793 of file eBoard.h.

References _serial(), _servoHandler, Servo::attach(), eagle_impl::TwoWire::begin(), eagle_impl::SoftwareSerial::begin(), ServoCds55::begin(), EBOARD_DEBUG_SPEED, eVirtual_main(), PIN_BLUETOOTH_RX, PIN_BLUETOOTH_STATE, PIN_MOTOR_DIR, PIN_MOTOR_SPE, PIN_SHIFT_CLK, PIN_SHIFT_DAT, PIN_SHIFT_LAT, setPin(), shiftAll(), STOP, Wire, Servo::write(), and writePWM().

3793  {
3794  //setup of RX and TX should be handled manually - in everyCase ^^
3797  #if EBOARD_DEBUG_MODE > 0x0
3798  Serial.begin(EBOARD_DEBUG_SPEED);
3799  #endif
3800  //this will initialize the interrupt handling!
3801  cli();
3802  TIMSK2 &= ~(1<<TOIE2);
3803  TCCR2A &= ~((1<<WGM21) | (1<<WGM20));
3804  TCCR2B &= ~(1<<WGM22);
3805  ASSR &= ~(1<<AS2);
3806  TIMSK2 &= ~(1<<OCIE2A);
3807  TCCR2B |= (1<<CS22);
3808  TCCR2B &= ~((1<<CS21) | (1<<CS20));
3809  TCNT2 = 256 - (int)((float)F_CPU * 0.001 / 64);
3810  TIMSK2 |= (1<<TOIE2);
3811  sei();
3812  #if EBOARD_BLUETOOTH > 0x0
3813 
3814 
3815  #if (EBOARD_BLUETOOTH > 0x0) && (((PIN_BLUETOOTH_RX==0x13) && (PIN_BLUETOOTH_TX==0x12)) && defined(__AVR_ATmega2560__))
3816  Serial1.begin(38400);
3817  #else
3818  _serial.begin(38400);
3819  #endif
3821  #endif
3822  #if EBOARD_I2C > 0x0
3823  Wire.begin();
3824  #endif
3825  #if EBOARD_SHIFT_REGISTER > 0x0
3826  pinMode(PIN_SHIFT_CLK,OUTPUT);
3827  pinMode(PIN_SHIFT_DAT,OUTPUT);
3828  pinMode(PIN_SHIFT_LAT,OUTPUT);
3829  shiftAll(); //set all to 0
3830  #endif
3831  #if EBOARD_USE_SPI > 0x0 && (EBOARD_NANO == 0)
3832  _servoHandler.begin(); //Setup SPI
3833  #endif
3834  #if EBOARD_NANO > 0x0
3835  mainMotor.attach(EBOARD_NANO_MAIN);
3836  steerMotor.attach(EBOARD_NANO_STEER);
3837  #if EBOARD_DEBUG_MODE > 0x0
3838  Serial.println("Initializing main driving motor (3s)");
3839  #endif
3840  mainMotor.write(90);
3841  delay(3005);
3842  #if EBOARD_DEBUG_MODE > 0x0
3843  Serial.println("Initializing of main driving motor completed");
3844  #endif
3845  #endif
3846  #if EBOARD_DEBUG_MODE > 0x0
3847  Serial.print((char) eVirtual_main());
3848  Serial.println("fin");
3849  #else
3850  eVirtual_main();
3851  #endif
3852  if (STOP) {} //prevent unused error
3853  delay(200);
3854  #if EBOARD_NANO > 0x0
3855  mainMotor.write(90);
3856  #endif
3857  cli(); //disable timers after running the program :D
3858  #if EBOARD_NANO == 0x0
3859  writePWM(0);analogWrite(PIN_MOTOR_SPE,0);
3860  #endif
3861  }
void writePWM(optVAL_t val)
write a clamped pwm value to an output pin
Definition: eBoard.h:1426
#define PIN_SHIFT_LAT
Definition: eBoard.h:820
#define EBOARD_DEBUG_SPEED
Definition: eBoard.h:707
TwoWire Wire
Definition: eBoard.h:543
#define PIN_BLUETOOTH_RX
Definition: eBoard.h:789
#define PIN_SHIFT_DAT
Definition: eBoard.h:816
void begin()
Definition: eBoard.h:1512
#define PIN_MOTOR_DIR
Definition: eBoard.h:804
int eVirtual_main()
SoftwareSerial _serial(0x13, 0x12)
static bool STOP
Definition: eBoard.h:641
void shiftAll(void)
[SHIFT] Changes bits according to store_bits
Definition: eBoard.h:1411
ServoCds55 _servoHandler
Definition: eBoard.h:1588
#define PIN_BLUETOOTH_STATE
Definition: eBoard.h:781
#define PIN_SHIFT_CLK
Definition: eBoard.h:812
void setPin(optVAL_t idx, optVAL_t mode=0x1)
[COPY&PASTE] set a pin to a certain mode => checkPin() will return true then
Definition: eBoard.h:1341
#define PIN_MOTOR_SPE
Definition: eBoard.h:808
void begin(long speed)
Definition: eBoard.h:1164
+ Here is the call graph for this function:

◆ shiftAll()

void shiftAll ( void  )

[SHIFT] Changes bits according to store_bits

Definition at line 1411 of file eBoard.h.

References PIN_SHIFT_CLK, PIN_SHIFT_DAT, PIN_SHIFT_LAT, STOP, and store_bits.

Referenced by setup(), and shiftSingle().

1411  {
1412  digitalWrite(PIN_SHIFT_LAT,LOW);
1413  for(optVAL_t c = 0; (c<32 && !STOP); c++){
1414  digitalWrite(PIN_SHIFT_CLK,LOW);
1415  shiftOut(PIN_SHIFT_DAT,PIN_SHIFT_CLK,MSBFIRST,bitRead(store_bits,c));
1416  }
1417  digitalWrite(PIN_SHIFT_LAT,LOW);
1418  }
#define PIN_SHIFT_LAT
Definition: eBoard.h:820
long store_bits
Definition: eBoard.h:1401
#define PIN_SHIFT_DAT
Definition: eBoard.h:816
int optVAL_t
Definition: eBoard.h:648
static bool STOP
Definition: eBoard.h:641
#define PIN_SHIFT_CLK
Definition: eBoard.h:812
+ Here is the caller graph for this function:

◆ shiftSingle()

void shiftSingle ( optVAL_t  idx,
bool  val 
)
inline

[SHIFT] Changes a single output Pin

Parameters
idxindex of the bit :D
valthe new state of this bit
Note
uses store_bits

Definition at line 1407 of file eBoard.h.

References shiftAll(), and store_bits.

Referenced by writePin().

1407  {
1408  bitWrite(store_bits,idx,val);
1409  shiftAll();
1410  }
long store_bits
Definition: eBoard.h:1401
void shiftAll(void)
[SHIFT] Changes bits according to store_bits
Definition: eBoard.h:1411
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SIGNAL()

SIGNAL ( TIMER1_COMPA_vect  )

Definition at line 3636 of file eBoard.h.

References _timer1, and handle_interrupts().

3637  {
3638  handle_interrupts(_timer1, &TCNT1, &OCR1A);
3639  }
static void handle_interrupts(timer16_Sequence_t timer, volatile uint16_t *TCNTn, volatile uint16_t *OCRnA)
Definition: eBoard.h:3610
+ Here is the call graph for this function:

◆ trig_rept_task()

void trig_rept_task ( )

Definition at line 3763 of file eBoard.h.

References _OpwmValue, _pwmValue, PIN_MOTOR_SPE, and rept_task().

Referenced by ISR().

3763  {
3764  if (_pwmValue!=_OpwmValue){
3765  analogWrite(PIN_MOTOR_SPE,_pwmValue);
3767  }
3768  #ifdef REPT_TASK
3769  rept_task();
3770  #endif
3771  }
optVAL_t _pwmValue
Definition: eBoard.h:1422
optVAL_t _OpwmValue
Definition: eBoard.h:1422
#define PIN_MOTOR_SPE
Definition: eBoard.h:808
void rept_task(void)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ twi_attachSlaveRxEvent()

void twi_attachSlaveRxEvent ( void(*)(uint8_t *, int)  function)

Definition at line 200 of file eBoard.h.

References twi_onSlaveReceive.

Referenced by eagle_impl::TwoWire::begin().

200  {
201  twi_onSlaveReceive = function;
202  }
static void(* twi_onSlaveReceive)(uint8_t *, int)
Definition: eBoard.h:119
+ Here is the caller graph for this function:

◆ twi_attachSlaveTxEvent()

void twi_attachSlaveTxEvent ( void(*)(void)  function)

Definition at line 203 of file eBoard.h.

References twi_onSlaveTransmit.

Referenced by eagle_impl::TwoWire::begin().

203  {
204  twi_onSlaveTransmit = function;
205  }
static void(* twi_onSlaveTransmit)(void)
Definition: eBoard.h:118
+ Here is the caller graph for this function:

◆ twi_init()

void twi_init ( void  )

Definition at line 129 of file eBoard.h.

References cbi, TWI_FREQ, twi_inRepStart, TWI_READY, twi_sendStop, and twi_state.

Referenced by eagle_impl::TwoWire::begin().

129  {
131  twi_sendStop = true;
132  twi_inRepStart = false;
133  digitalWrite(SDA, 1);
134  digitalWrite(SCL, 1);
135  cbi(TWSR, TWPS0);
136  cbi(TWSR, TWPS1);
137  TWBR = ((F_CPU / TWI_FREQ) - 16) / 2;
138  TWCR = _BV(TWEN) | _BV(TWIE) | _BV(TWEA);
139  }
static volatile uint8_t twi_inRepStart
Definition: eBoard.h:117
#define TWI_FREQ
Definition: eBoard.h:93
#define TWI_READY
Definition: eBoard.h:98
static volatile uint8_t twi_sendStop
Definition: eBoard.h:116
static volatile uint8_t twi_state
Definition: eBoard.h:114
#define cbi(sfr, bit)
Definition: eBoard.h:108
+ Here is the caller graph for this function:

◆ twi_readFrom()

uint8_t twi_readFrom ( uint8_t  address,
uint8_t *  data,
uint8_t  length,
uint8_t  sendStop 
)

Definition at line 143 of file eBoard.h.

References TWI_BUFFER_LENGTH, twi_error, twi_inRepStart, twi_masterBuffer, twi_masterBufferIndex, twi_masterBufferLength, TWI_MRX, TWI_READY, twi_sendStop, twi_slarw, and twi_state.

Referenced by eagle_impl::TwoWire::requestFrom().

143  {
144  uint8_t i;
145  if(TWI_BUFFER_LENGTH < length) return 0;
146  while(TWI_READY != twi_state) continue;
147  twi_state = TWI_MRX;
148  twi_sendStop = sendStop;
149  twi_error = 0xFF;
151  twi_masterBufferLength = length-1;
152  twi_slarw = TW_READ;
153  twi_slarw |= address << 1;
154  if (true == twi_inRepStart) {
155  twi_inRepStart = false;
156  TWDR = twi_slarw;
157  TWCR = _BV(TWINT) | _BV(TWEA) | _BV(TWEN) | _BV(TWIE); // enable INTs, but not START
158  }
159  else
160  TWCR = _BV(TWEN) | _BV(TWIE) | _BV(TWEA) | _BV(TWINT) | _BV(TWSTA);
161  while(TWI_MRX == twi_state) continue;
162  if (twi_masterBufferIndex < length)
163  length = twi_masterBufferIndex;
164  for(i = 0; i < length; ++i) data[i] = twi_masterBuffer[i];
165  return length;
166  }
static volatile uint8_t twi_inRepStart
Definition: eBoard.h:117
static volatile uint8_t twi_masterBufferIndex
Definition: eBoard.h:121
static volatile uint8_t twi_slarw
Definition: eBoard.h:115
static volatile uint8_t twi_masterBufferLength
Definition: eBoard.h:122
#define TWI_READY
Definition: eBoard.h:98
static uint8_t twi_masterBuffer[32]
Definition: eBoard.h:120
static volatile uint8_t twi_error
Definition: eBoard.h:128
static volatile uint8_t twi_sendStop
Definition: eBoard.h:116
#define TWI_BUFFER_LENGTH
Definition: eBoard.h:96
static volatile uint8_t twi_state
Definition: eBoard.h:114
#define TWI_MRX
Definition: eBoard.h:99
+ Here is the caller graph for this function:

◆ twi_releaseBus()

void twi_releaseBus ( void  )

Definition at line 218 of file eBoard.h.

References TWI_READY, and twi_state.

Referenced by ISR().

218  {
219  TWCR = _BV(TWEN) | _BV(TWIE) | _BV(TWEA) | _BV(TWINT);
221  }
#define TWI_READY
Definition: eBoard.h:98
static volatile uint8_t twi_state
Definition: eBoard.h:114
+ Here is the caller graph for this function:

◆ twi_reply()

void twi_reply ( uint8_t  ack)

Definition at line 206 of file eBoard.h.

Referenced by ISR().

206  {
207  if(ack){
208  TWCR = _BV(TWEN) | _BV(TWIE) | _BV(TWINT) | _BV(TWEA);
209  }else{
210  TWCR = _BV(TWEN) | _BV(TWIE) | _BV(TWINT);
211  }
212  }
+ Here is the caller graph for this function:

◆ twi_setAddress()

void twi_setAddress ( uint8_t  address)
inline

Definition at line 140 of file eBoard.h.

Referenced by eagle_impl::TwoWire::begin().

140  {
141  TWAR = address << 1;
142  }
+ Here is the caller graph for this function:

◆ twi_stop()

void twi_stop ( void  )

Definition at line 213 of file eBoard.h.

References TWI_READY, and twi_state.

Referenced by ISR().

213  {
214  TWCR = _BV(TWEN) | _BV(TWIE) | _BV(TWEA) | _BV(TWINT) | _BV(TWSTO);
215  while(TWCR & _BV(TWSTO)) continue;
217  }
#define TWI_READY
Definition: eBoard.h:98
static volatile uint8_t twi_state
Definition: eBoard.h:114
+ Here is the caller graph for this function:

◆ twi_transmit()

uint8_t twi_transmit ( const uint8_t *  data,
uint8_t  length 
)

Definition at line 192 of file eBoard.h.

References TWI_BUFFER_LENGTH, twi_state, TWI_STX, twi_txBuffer, and twi_txBufferLength.

Referenced by eagle_impl::TwoWire::write().

192  {
193  uint8_t i;
194  if(TWI_BUFFER_LENGTH < length) return 1;
195  if(TWI_STX != twi_state) return 2;
196  twi_txBufferLength = length;
197  for(i = 0; i < length; ++i) twi_txBuffer[i] = data[i];
198  return 0;
199  }
#define TWI_STX
Definition: eBoard.h:102
static volatile uint8_t twi_txBufferLength
Definition: eBoard.h:125
#define TWI_BUFFER_LENGTH
Definition: eBoard.h:96
static volatile uint8_t twi_state
Definition: eBoard.h:114
static uint8_t twi_txBuffer[32]
Definition: eBoard.h:123
+ Here is the caller graph for this function:

◆ twi_writeTo()

uint8_t twi_writeTo ( uint8_t  address,
uint8_t *  data,
uint8_t  length,
uint8_t  wait,
uint8_t  sendStop 
)

Definition at line 167 of file eBoard.h.

References TWI_BUFFER_LENGTH, twi_error, twi_inRepStart, twi_masterBuffer, twi_masterBufferIndex, twi_masterBufferLength, TWI_MTX, TWI_READY, twi_sendStop, twi_slarw, and twi_state.

Referenced by eagle_impl::TwoWire::endTransmission().

167  {
168  uint8_t i;
169  if(TWI_BUFFER_LENGTH < length) return 1;
170  while(TWI_READY != twi_state) continue;
171  twi_state = TWI_MTX;
172  twi_sendStop = sendStop;
173  twi_error = 0xFF;
175  twi_masterBufferLength = length;
176  for(i = 0; i < length; ++i) twi_masterBuffer[i] = data[i];
177  twi_slarw = TW_WRITE;
178  twi_slarw |= address << 1;
179  if (true == twi_inRepStart) {
180  twi_inRepStart = false;
181  TWDR = twi_slarw;
182  TWCR = _BV(TWINT) | _BV(TWEA) | _BV(TWEN) | _BV(TWIE); // enable INTs, but not START
183  }
184  else
185  TWCR = _BV(TWINT) | _BV(TWEA) | _BV(TWEN) | _BV(TWIE) | _BV(TWSTA); // enable INTs
186  while(wait && (TWI_MTX == twi_state)) continue;
187  if (twi_error == 0xFF) return 0;
188  else if (twi_error == TW_MT_SLA_NACK) return 2;
189  else if (twi_error == TW_MT_DATA_NACK) return 3;
190  else return 4;
191  }
static volatile uint8_t twi_inRepStart
Definition: eBoard.h:117
static volatile uint8_t twi_masterBufferIndex
Definition: eBoard.h:121
static volatile uint8_t twi_slarw
Definition: eBoard.h:115
static volatile uint8_t twi_masterBufferLength
Definition: eBoard.h:122
#define TWI_READY
Definition: eBoard.h:98
static uint8_t twi_masterBuffer[32]
Definition: eBoard.h:120
static volatile uint8_t twi_error
Definition: eBoard.h:128
static volatile uint8_t twi_sendStop
Definition: eBoard.h:116
#define TWI_BUFFER_LENGTH
Definition: eBoard.h:96
#define TWI_MTX
Definition: eBoard.h:100
static volatile uint8_t twi_state
Definition: eBoard.h:114
+ Here is the caller graph for this function:

◆ writePin()

void writePin ( optVAL_t  idx,
bool  val 
)
inline

write a boolean state to an output pin

Note
this will automatically call setPin if COPY&PASTE
if SHIFT_REGISTER is enabled you can assign the additional outputs 0-based from 100
Parameters
idxthe index of the pin to use
valthe state the pin should have

Definition at line 1437 of file eBoard.h.

References checkIdx(), checkPin(), setPin(), and shiftSingle().

Referenced by SoccerBoard::led(), SoccerBoard::ledMeter(), SoccerBoard::ledOff(), SoccerBoard::ledOn(), SoccerBoard::ledsOff(), and SoccerBoard::power().

1437  {
1438  #if EBOARD_SHIFT_REGISTER > 0x0
1439  if(idx>0x63) {
1440  idx -= 0x64;
1441  shiftSingle(idx,val);
1442  return;
1443  }
1444  #endif
1445  #if EBOARD_CHECK_PINS > 0x0
1446  checkIdx(idx);
1447  if(!checkPin(idx))
1448  #endif
1449  #if EBOARD_COPY_AND_PASTE > 0x0
1450  setPin(idx);
1451  #else
1452  pinMode(idx,OUTPUT);
1453  #endif
1454  digitalWrite(idx,val);
1455  }
bool checkPin(optVAL_t idx, optVAL_t mode=0x1)
[COPY&PASTE] [CHECK_PINS] Check if a pin is set to a specific mode
Definition: eBoard.h:1332
void shiftSingle(optVAL_t idx, bool val)
[SHIFT] Changes a single output Pin
Definition: eBoard.h:1407
void setPin(optVAL_t idx, optVAL_t mode=0x1)
[COPY&PASTE] set a pin to a certain mode => checkPin() will return true then
Definition: eBoard.h:1341
void checkIdx(optVAL_t idx)
[DEBUG_MODE] used to check if a pin index is in bounds
Definition: eBoard.h:1296
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ writePWM()

void writePWM ( optVAL_t  val)
inline

write a clamped pwm value to an output pin

Note
this will use PIN_MOTOR_SPE
The value gets updated every EBOARD_PWM_SPE seconds
Parameters
valthe pwm value [0-255] to use

Definition at line 1426 of file eBoard.h.

References _pwmValue.

Referenced by SoccerBoard::motor(), SoccerBoard::motorsOff(), setup(), and I2CInOut::write().

1426  {
1427  val = min(val,0xFF); val = max(0x0,val);
1428  _pwmValue = val;
1429  }
optVAL_t _pwmValue
Definition: eBoard.h:1422
+ Here is the caller graph for this function:

◆ writeVal()

template<typename T >
void writeVal ( const T &  val)
inline

[BLUETOOTH] writes Data to bluetooth

Parameters
valThis is the data to be written. Can be int, str etc...

Definition at line 1383 of file eBoard.h.

References _serial(), and eagle_impl::SoftwareSerial::write().

Referenced by RB14Scan::write().

1383  {
1384  #if (EBOARD_BLUETOOTH > 0x0) && (((PIN_BLUETOOTH_RX==0x13) && (PIN_BLUETOOTH_TX==0x12)) && defined(__AVR_ATmega2560__))
1385  Serial1.write(val);
1386  #else
1387  _serial.write(val);
1388  #endif
1389  }
virtual size_t write(uint8_t byte)
Definition: eBoard.h:1207
SoftwareSerial _serial(0x13, 0x12)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ _gammaTable

const uint8_t PROGMEM _gammaTable[256]
static
Initial value:
= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3,
3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 7,
7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 11, 12, 12,
13, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20,
20, 21, 21, 22, 22, 23, 24, 24, 25, 25, 26, 27, 27, 28, 29, 29,
30, 31, 31, 32, 33, 34, 34, 35, 36, 37, 38, 38, 39, 40, 41, 42,
42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
58, 59, 60, 61, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 75,
76, 77, 78, 80, 81, 82, 84, 85, 86, 88, 89, 90, 92, 93, 94, 96,
97, 99,100,102,103,105,106,108,109,111,112,114,115,117,119,120,
122,124,125,127,129,130,132,134,136,137,139,141,143,145,146,148,
150,152,154,156,158,160,162,164,166,168,170,172,174,176,178,180,
182,184,186,188,191,193,195,197,199,202,204,206,209,211,213,215,
218,220,223,225,227,230,232,235,237,240,242,245,247,250,252,255}

Definition at line 3521 of file eBoard.h.

Referenced by NeoPixel::gamma8().

◆ _OpwmValue

optVAL_t _OpwmValue = 0x0

Definition at line 1422 of file eBoard.h.

Referenced by trig_rept_task().

◆ _pwmValue

optVAL_t _pwmValue = 0x0

Definition at line 1422 of file eBoard.h.

Referenced by trig_rept_task(), and writePWM().

◆ _servoHandler

ServoCds55 _servoHandler

Definition at line 1588 of file eBoard.h.

Referenced by SoccerBoard::motor(), AX12Servo::setID(), AX12Servo::setPosition(), and setup().

◆ _sineTable

const uint8_t PROGMEM _sineTable[256]
static
Initial value:
= {
128,131,134,137,140,143,146,149,152,155,158,162,165,167,170,173,
176,179,182,185,188,190,193,196,198,201,203,206,208,211,213,215,
218,220,222,224,226,228,230,232,234,235,237,238,240,241,243,244,
245,246,248,249,250,250,251,252,253,253,254,254,254,255,255,255,
255,255,255,255,254,254,254,253,253,252,251,250,250,249,248,246,
245,244,243,241,240,238,237,235,234,232,230,228,226,224,222,220,
218,215,213,211,208,206,203,201,198,196,193,190,188,185,182,179,
176,173,170,167,165,162,158,155,152,149,146,143,140,137,134,131,
128,124,121,118,115,112,109,106,103,100, 97, 93, 90, 88, 85, 82,
79, 76, 73, 70, 67, 65, 62, 59, 57, 54, 52, 49, 47, 44, 42, 40,
37, 35, 33, 31, 29, 27, 25, 23, 21, 20, 18, 17, 15, 14, 12, 11,
10, 9, 7, 6, 5, 5, 4, 3, 2, 2, 1, 1, 1, 0, 0, 0,
0, 0, 0, 0, 1, 1, 1, 2, 2, 3, 4, 5, 5, 6, 7, 9,
10, 11, 12, 14, 15, 17, 18, 20, 21, 23, 25, 27, 29, 31, 33, 35,
37, 40, 42, 44, 47, 49, 52, 54, 57, 59, 62, 65, 67, 70, 73, 76,
79, 82, 85, 88, 90, 93, 97,100,103,106,109,112,115,118,121,124}

Definition at line 3504 of file eBoard.h.

Referenced by NeoPixel::sine8().

◆ basicFont

PROGMEM const byte basicFont[][8]

Definition at line 1956 of file eBoard.h.

Referenced by LCD::print().

◆ Channel

volatile int8_t Channel[_Nbr_16timers]
static

Definition at line 3601 of file eBoard.h.

Referenced by handle_interrupts().

◆ pin_in

uint64_t pin_in = 0x0

Definition at line 1327 of file eBoard.h.

Referenced by checkPin(), and setPin().

◆ pin_out

uint64_t pin_out = 0x0

Definition at line 1321 of file eBoard.h.

Referenced by checkPin(), and setPin().

◆ ServoCount

uint8_t ServoCount = 0

Definition at line 3602 of file eBoard.h.

Referenced by handle_interrupts(), and Servo::Servo().

◆ servos

◆ SPI

SPIClass SPI

Definition at line 632 of file eBoard.h.

Referenced by ServoCds55::begin(), and ServoCds55::sendWait().

◆ STOP

bool STOP = false
static

Definition at line 641 of file eBoard.h.

Referenced by DynamixelBoard::action(), pingI2C(), readI2C(), setup(), and shiftAll().

◆ store_bits

long store_bits = 0L

Definition at line 1401 of file eBoard.h.

Referenced by shiftAll(), and shiftSingle().

◆ timer_count

int timer_count = 0

Definition at line 3775 of file eBoard.h.

Referenced by ISR().

◆ timer_ofl

bool timer_ofl = false

Definition at line 3776 of file eBoard.h.

Referenced by ISR().

◆ twi_error

volatile uint8_t twi_error
static

Definition at line 128 of file eBoard.h.

Referenced by ISR(), twi_readFrom(), and twi_writeTo().

◆ twi_inRepStart

volatile uint8_t twi_inRepStart
static

Definition at line 117 of file eBoard.h.

Referenced by ISR(), twi_init(), twi_readFrom(), and twi_writeTo().

◆ twi_masterBuffer

uint8_t twi_masterBuffer[32]
static

Definition at line 120 of file eBoard.h.

Referenced by ISR(), twi_readFrom(), and twi_writeTo().

◆ twi_masterBufferIndex

volatile uint8_t twi_masterBufferIndex
static

Definition at line 121 of file eBoard.h.

Referenced by ISR(), twi_readFrom(), and twi_writeTo().

◆ twi_masterBufferLength

volatile uint8_t twi_masterBufferLength
static

Definition at line 122 of file eBoard.h.

Referenced by ISR(), twi_readFrom(), and twi_writeTo().

◆ twi_onSlaveReceive

void(* twi_onSlaveReceive) (uint8_t *, int)
static

Definition at line 119 of file eBoard.h.

Referenced by ISR(), and twi_attachSlaveRxEvent().

◆ twi_onSlaveTransmit

void(* twi_onSlaveTransmit) (void)
static

Definition at line 118 of file eBoard.h.

Referenced by ISR(), and twi_attachSlaveTxEvent().

◆ twi_rxBuffer

uint8_t twi_rxBuffer[32]
static

Definition at line 126 of file eBoard.h.

Referenced by ISR().

◆ twi_rxBufferIndex

volatile uint8_t twi_rxBufferIndex
static

Definition at line 127 of file eBoard.h.

Referenced by ISR().

◆ twi_sendStop

volatile uint8_t twi_sendStop
static

Definition at line 116 of file eBoard.h.

Referenced by ISR(), twi_init(), twi_readFrom(), and twi_writeTo().

◆ twi_slarw

volatile uint8_t twi_slarw
static

Definition at line 115 of file eBoard.h.

Referenced by ISR(), twi_readFrom(), and twi_writeTo().

◆ twi_state

volatile uint8_t twi_state
static

Definition at line 114 of file eBoard.h.

Referenced by ISR(), twi_init(), twi_readFrom(), twi_releaseBus(), twi_stop(), twi_transmit(), and twi_writeTo().

◆ twi_txBuffer

uint8_t twi_txBuffer[32]
static

Definition at line 123 of file eBoard.h.

Referenced by ISR(), and twi_transmit().

◆ twi_txBufferIndex

volatile uint8_t twi_txBufferIndex
static

Definition at line 124 of file eBoard.h.

Referenced by ISR().

◆ twi_txBufferLength

volatile uint8_t twi_txBufferLength
static

Definition at line 125 of file eBoard.h.

Referenced by ISR(), and twi_transmit().

◆ Wire

TwoWire Wire = TwoWire()

Definition at line 543 of file eBoard.h.

Referenced by LCD::changeBrightness(), pingI2C(), readI2C(), LCD::s1Cmd(), LCD::s1Dat(), sendI2C(), and setup().