FL0WL0W / EmbeddedIOServices

General Input/Output services for Embedded Systems

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

General Input/Output services for Embedded Systems


Languages

Language:C++ 98.1%Language:CMake 1.0%Language:C 1.0%