mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-15 17:02:53 +08:00
b0840b9869
* format * use inner_bytecode instead of obj_run * add asserts for event-test * test event for PikaStdDevice is ok * adding event fealure * fetch PikaStdDevice_Time to port linux
17 lines
615 B
C
17 lines
615 B
C
#include "TemplateDevice_GPIO.h"
|
|
|
|
void TemplateDevice_GPIO_platformDisable(PikaObj* self) {}
|
|
void TemplateDevice_GPIO_platformEnable(PikaObj* self) {}
|
|
void TemplateDevice_GPIO_platformHigh(PikaObj* self) {}
|
|
void TemplateDevice_GPIO_platformLow(PikaObj* self) {}
|
|
void TemplateDevice_GPIO_platformRead(PikaObj* self) {}
|
|
void TemplateDevice_GPIO_platformSetMode(PikaObj* self) {}
|
|
|
|
const uint32_t GPIO_PA8_EVENT_ID = 0x08;
|
|
void TemplateDevice_GPIO_platformGetEventId(PikaObj* self) {
|
|
char* pin = obj_getStr(self, "pin");
|
|
if (strEqu(pin, "PA8")) {
|
|
obj_setInt(self, "eventId", GPIO_PA8_EVENT_ID);
|
|
}
|
|
}
|