mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-15 19:13:18 +00:00
Update mqtt-dashboard, adopt new UI, break OTA for now..
This commit is contained in:
1 parent
daa47e8272
commit
a86bde7b3f
16 files changed
+399
-297
No files matched your search
@@ -0,0 +1,19 @@
|
||||
#include "hal.h"
|
||||
|
||||
#define MAX_PIN_NO 144
|
||||
|
||||
// Mocked device pins
|
||||
static bool s_pins[MAX_PIN_NO];
|
||||
|
||||
bool gpio_write(uint16_t pin, bool status) {
|
||||
bool ok = false;
|
||||
if (pin >= 0 && pin < MAX_PIN_NO) {
|
||||
s_pins[pin] = status;
|
||||
ok = true;
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool gpio_read(uint16_t pin) {
|
||||
return (pin >= 0 && pin < MAX_PIN_NO) ? s_pins[pin] : false;
|
||||
}
|
||||
Reference in new issue
Block a user