extern bool ADC_Read(int id, int *value);
extern bool PWM_Set(int pin, bool polarity, long period, long duty); // period and duty are in ns
-extern void PWM_Stop(int pin);
+extern bool PWM_Stop(int pin);
#else
-//Empty defines so it compiles on any platform that's not the BBB
+//'Empty' defines so it compiles on any platform that's not the BBB
extern bool GPIO_Export(int pin);
extern void GPIO_Unexport(int pin);
#define ADC_Export(pin) true
#define ADC_Unexport(pin)
+//Hack to both zero the result field (so it's never uninitialised) and return true
#define GPIO_Read(pin, result) ((*(result) = 0) == 0)
#define GPIO_Set(pin, value) true
#define ADC_Read(id, value) ((*(value) = 0) == 0)
#define PWM_Set(pin, polarity, period, duty) true
-#define PWM_Stop(pin)
+#define PWM_Stop(pin) true
#endif //_BBB