TemplateDevice_GPIO.c 615 B

12345678910111213141516
  1. #include "TemplateDevice_GPIO.h"
  2. void TemplateDevice_GPIO_platformDisable(PikaObj* self) {}
  3. void TemplateDevice_GPIO_platformEnable(PikaObj* self) {}
  4. void TemplateDevice_GPIO_platformHigh(PikaObj* self) {}
  5. void TemplateDevice_GPIO_platformLow(PikaObj* self) {}
  6. void TemplateDevice_GPIO_platformRead(PikaObj* self) {}
  7. void TemplateDevice_GPIO_platformSetMode(PikaObj* self) {}
  8. const uint32_t GPIO_PA8_EVENT_ID = 0x08;
  9. void TemplateDevice_GPIO_platformGetEventId(PikaObj* self) {
  10. char* pin = obj_getStr(self, "pin");
  11. if (strEqu(pin, "PA8")) {
  12. obj_setInt(self, "eventId", GPIO_PA8_EVENT_ID);
  13. }
  14. }