|
PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
|
19 #include <propeller.h>
37 static touch badgeTouch;
39 unsigned char TPPins[7];
41 int32_t touch_start(int32_t
count,
unsigned char *p_pins, int32_t dms)
44 int32_t _parm__0000[4];
45 _parm__0000[0] =
count;
46 _parm__0000[1] = (uint32_t) p_pins;
54 memmove( (
void *)&tself->pincount, (
void *)&_parm__0000[0], 4*(3));
58 int32_t _limit__0024 = (tself->pincount - 1);
59 int32_t _step__0025 = 1;
61 if (_parm__0000[3] >= _limit__0024) _step__0025 = -_step__0025;
63 tself->pinsmask = tself->pinsmask | (1 << ((uint8_t *)tself->p_pinslist)[((tself->pincount - 1) - _parm__0000[3])]);
64 _parm__0000[3] = _parm__0000[3] + _step__0025;
65 }
while (((_step__0025 > 0) && (_parm__0000[3] <= _limit__0024)) || ((_step__0025 < 0) && (_parm__0000[3] >= _limit__0024)));
72 char *addr = (
char *) tself->p_pinslist;
73 int pin = addr[6-pad];
75 for(
int i = 0; i < 5; i++)
93 int mask = tself->pinsmask;
94 for(
int i = 0; i < 5; i++)
110 char *addr = (
char *) tself->p_pinslist;
112 for(
int i = 0; i < 7; i++)
116 int bit = (pb >> pin) & 1;
#define OUTA
Use to set output pin states when corresponding DIRA bits are 1.
#define INA
Use to read the pins when corresponding DIRA bits are 0.
#define DIRA
Use to set pins to input (0) or output (1).