eBoard ①⑧⑨
Written for SIA 2017/2018
eagle_PinCtrl.h File Reference

this file contains cool stuff... it controls pins More...

+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void writePWM (optVAL_t val)
 write a clamped pwm value to an output pin More...
 
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...
 

Variables

optVAL_t _pwmValue = 0x0
 
optVAL_t _OpwmValue = 0x0
 

Detailed Description

this file contains cool stuff... it controls pins

Last Updated:

Version
3.2.0a

Definition in file eagle_PinCtrl.h.

Function Documentation

◆ 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

◆ 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

◆ 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

Variable Documentation

◆ _OpwmValue

optVAL_t _OpwmValue = 0x0

Definition at line 21 of file eagle_PinCtrl.h.

◆ _pwmValue

optVAL_t _pwmValue = 0x0
Note
this is the current to-write PWM value

Definition at line 21 of file eagle_PinCtrl.h.