PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
libArduino
libPropelleruino
wiring_digital.c
1
9
#include <
Arduino.h
>
10
11
void
pinMode(uint8_t pin, uint8_t mode)
12
{
13
DIRA
= ((
DIRA
& (~(1 << pin))) | ((mode & 0x1) << pin));
14
}
15
16
void
digitalWrite(uint8_t pin, uint8_t value)
17
{
18
OUTA
= ((
OUTA
& (~(1 << pin))) | ((value & 0x1) << pin));
19
}
20
21
int
digitalRead(uint8_t pin)
22
{
23
return
((
INA
>> pin) & 0x1);
24
}
OUTA
#define OUTA
Use to set output pin states when corresponding DIRA bits are 1.
Definition:
propeller1.h:157
INA
#define INA
Use to read the pins when corresponding DIRA bits are 0.
Definition:
propeller1.h:153
Arduino.h
Provides Arduino types and functions on the Propeller.
DIRA
#define DIRA
Use to set pins to input (0) or output (1).
Definition:
propeller1.h:161
Generated on Fri May 20 2022 16:48:01 for PropWare by
1.8.17