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:
Gordon Henderson
2014-06-24 19:23:31 +01:00
parent 05e2f67e7f
commit 6fba403b2f
8 changed files with 260 additions and 32 deletions

View File

@@ -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) ;