1 #ifndef LIBPROPELLER_PIN_H_
2 #define LIBPROPELLER_PIN_H_
5 #define INLINE __attribute__((always_inline)) inline
110 void pwm(
const int decihz,
const bool useCTRA =
true,
Pin * alternatePin = NULL) {
114 const int frq = (decihz * (((1 << 30) / CLKFREQ) << 2)) / 10;
115 int ctr = (0b00101000 << 23) + pinNumber;
117 if(alternatePin != NULL){
118 ctr += alternatePin->getPin() << 9;
119 alternatePin->setOutput();
141 unsigned int pin_mask;
181 return (
DIRA & pin_mask) ?
true :
false;
186 return (
INA & pin_mask) != 0;
189 INLINE void Pin::setOutput() {
194 #endif // LIBPROPELLER_PIN_H_