Skip to content

Latest commit

 

History

History
45 lines (42 loc) · 1.51 KB

README.md

File metadata and controls

45 lines (42 loc) · 1.51 KB

EmbeddedIOServices

This is a unit tested hardware abstraction for embedded systems. The timer service has a built in scheduling system that can be used to trigger callbacks at precise times. Testing with 32 callbacks being scheduled on a STM32F103, sub microsecond accuracy was observed.

Interfaces that need to be implemented when adding new hardware abstraction

  • IAnalogService
    • InitPin(uint16 pin)
    • ReadPin(uint16 pin)
  • IDigitalService
    • InitPin(uint16 pin, PinDirection direction)
    • ReadPin(uint16 pin)
    • WritePin(uint16 pin, bool value)
    • ScheduleRecurringInterrupt(uint16 pin, CallBack callBack)
    • ScheduleNextInterrupt(uint16 pin, CallBack callBack)
  • IPwmService
    • InitPin(uint16 pin, PinDirection direction, uint16 minFrequency)
    • ReadPin(uint16 pin)
    • WritePin(uint16 pin, PwmValue value)
  • ITimerService
    • GetTick()
    • GetTicksPerSecond()
    • ScheduleCallBack(tick_t tick) <= this is to call ReturnCallBack() at that tick
  • ICommunicationService (UART, CAN, TCP, etc.)
    • Call Receive(void* data, size_t length) when data received
    • Send(void* data, size_t length)

Currently Supported Microcontroller

  • STM32F103Cx
  • STM32F401CC
  • Full Stm32 Line, just add Stm32HalConf.h
  • W806 and W801