Added module for direct control over pins
Will hopefully be useful for testing purposes.
Usage:
1. GPIO Set
http://192.168.1.10/api/pin?type=gpo&set=S&num=N
- S is 0 or 1 and N is the pin number (1 to 96)
2. GPIO Read
http://192.168.1.10/api/pin?type=gpi&num=N
- N is pin number
3. ADC Read
http://192.168.1.10/api/pin?type=adc&num=N
- N is pin number (0 to 7)
4. PWM Set
http://192.168.1.10/api/pin?type=pwm&num=N&set=1&freq=F&duty=D&pol=P
- F in Hz, D as a multiplier (0 -> 1) P is 0 or 1
- N is pin number (0 to 7)
5. PWM Stop
http://192.168.1.10/api/pin?type=pwm&num=N&set=0
Pin numbering according to http://beagleboard.org/static/images/cape-headers-pwm.png
PWM pins are numbered as: EHRPWM0A = 0, EHRPWM0B = 1, EHRPWM1A = 2, etc
Module code in pin_test.c and pin_test.h.
Uses functions declared in bbb_pin.h and implemented in bbb_pin.c
Note:
- Also modified bbb_pin.c functions to not throw Fatal errors
- Might want to change that back. It seemed like a good idea at 2am.
BUG ALERT:
- Doing the following:
http://192.168.1.10/api/pin?type=gpo&num=13&set=0
Will give a FCGIRejectJSON (invalid Pin number).
12 files changed:
UCC git Repository :: git.ucc.asn.au