mirror of
https://github.com/clockworkpi/WiringPi.git
synced 2026-06-13 22:33:11 +02:00
Updates for the Raspnerry Pi Compute Module - changes to the gpio program
to produce a nicer 'readall' output too. It also understands new pins 53,54,55 and 56 in wiringPiSetupPhys() mode to represent the pins on the P5 connector on the Rev 2 Pi's Changes to pinMode() to allow new modes SOFT_PWM and SOFT_TONE.
This commit is contained in:
@@ -43,6 +43,7 @@
|
||||
#define PWM_OUTPUT 2
|
||||
#define GPIO_CLOCK 3
|
||||
#define SOFT_PWM_OUTPUT 4
|
||||
#define SOFT_TONE_OUTPUT 5
|
||||
|
||||
#define LOW 0
|
||||
#define HIGH 1
|
||||
@@ -65,6 +66,13 @@
|
||||
#define INT_EDGE_RISING 2
|
||||
#define INT_EDGE_BOTH 3
|
||||
|
||||
// Pi model types
|
||||
|
||||
#define PI_MODEL_A 0
|
||||
#define PI_MODEL_B 1
|
||||
#define PI_MODEL_CM 2
|
||||
|
||||
|
||||
// Threads
|
||||
|
||||
#define PI_THREAD(X) void *X (void *dummy)
|
||||
@@ -116,6 +124,12 @@ extern struct wiringPiNodeStruct *wiringPiNodes ;
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// Data
|
||||
|
||||
extern const char *piModelNames [] ;
|
||||
extern const char *piRevisionNames[] ;
|
||||
extern const char *piComputeRevisionNames[] ;
|
||||
|
||||
// Internal
|
||||
|
||||
extern int wiringPiFailure (int fatal, const char *message, ...) ;
|
||||
@@ -148,6 +162,7 @@ extern int wiringPiSetupPiFaceForGpioProg (void) ; // Don't use this - for gpio
|
||||
// On-Board Raspberry Pi hardware specific stuff
|
||||
|
||||
extern int piBoardRev (void) ;
|
||||
extern void piBoardId (int *model, int *rev, int *mem, char **maker) ;
|
||||
extern int wpiPinToGpio (int wpiPin) ;
|
||||
extern int physPinToGpio (int physPin) ;
|
||||
extern void setPadDrive (int group, int value) ;
|
||||
|
||||
Reference in New Issue
Block a user