git.ucc.asn.au
/
matches
/
MCTX3420.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Automatic commit of irc logs
[matches/MCTX3420.git]
/
server
/
bbb_pin.c
diff --git
a/server/bbb_pin.c
b/server/bbb_pin.c
index
2ffc9e5
..
199706f
100644
(file)
--- a/
server/bbb_pin.c
+++ b/
server/bbb_pin.c
@@
-334,6
+334,7
@@
void ADC_Unexport(int pin)
/**
* Set a GPIO pin
* @param pin - The pin to set. MUST have been exported before calling this function.
/**
* Set a GPIO pin
* @param pin - The pin to set. MUST have been exported before calling this function.
+ * @param value - The value to set the GPIO pin to.
*/
bool GPIO_Set(int pin, bool value)
{
*/
bool GPIO_Set(int pin, bool value)
{
@@
-501,7
+502,8
@@
bool ADC_Read(int id, int *value)
if (pread(g_adc[id].fd_value, adc_str, ADC_DIGITS-1, 0) == -1)
{
if (pread(g_adc[id].fd_value, adc_str, ADC_DIGITS-1, 0) == -1)
{
- AbortBool("ADC %d read failed: %s", id, strerror(errno));
+ //AbortBool("ADC %d read failed: %s", id, strerror(errno));
+ return false;
}
*value = strtol(adc_str, NULL, 10);
}
*value = strtol(adc_str, NULL, 10);
UCC
git Repository :: git.ucc.asn.au