 |
PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
|
Go to the documentation of this file.
23 #ifndef _PROPELLER2_H_
24 #define _PROPELLER2_H_
41 static __inline__
int coginit(
int id,
void *image,
void *par)
45 "coginit %[_image], %[_par] wr,wc\n\t"
46 "if_c neg %[_image], #1"
54 return (uint32_t)image;
65 static __inline__ uint32_t
getcnt(
void)
87 static __inline__
int getpin(
int pin)
92 "mov %[_value], #0\n\t"
113 static __inline__
void setpin(
int pin,
int value)
116 "rcr %[_value], #1 wc,nr\n\t"
static __inline__ uint32_t getcnt(void)
CNT register accessor.
static __inline__ int getpin(int pin)
getpin accessor used to read the state of a pin.
static __inline__ void setpin(int pin, int value)
setpin accessor used to write the state of a pin.
static __inline__ void togglepin(int pin)
togglepin accessor used to toggle the state of a pin.
static __inline__ int coginit(int id, void *image, void *par)
Start a cog with a parameter.