Skip to content

hphuc15/baredrv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 

Repository files navigation

baredrv

Lightweight, platform-independent drivers for embedded peripherals. Designed to work on any microcontroller without vendor lock-in. Each driver lives on its own branch - clone only what you need.

Drivers

Driver Device Protocol Description
bh1750 BH1750FVI I2C Ambient light sensor
sht3x SHT30/31/35 I2C Temperature & humidity sensor
scd4x SCD40/41 I2C CO₂, temperature & humidity sensor
sps30 SPS30 UART/I2C PM1.0, PM2.5, PM4.0, PM10
ze07 ZE07 UART CO
sx127x SX1276/7/8/9 SPI LoRa communication

Clone:

git clone --branch bh1750 --single-branch https://github.com/hphuc15/baredrv bh1750
git clone --branch sht3x  --single-branch https://github.com/hphuc15/baredrv sht3x
git clone --branch scd4x  --single-branch https://github.com/hphuc15/baredrv scd4x
git clone --branch sps30  --single-branch https://github.com/hphuc15/baredrv sps30
git clone --branch ze07   --single-branch https://github.com/hphuc15/baredrv ze07
git clone --branch sx127x --single-branch https://github.com/hphuc15/baredrv sx127x

Need multiple drivers? Just repeat the command for each one into the same folder:

mkdir sensors && cd sensors
git clone --branch sht3x --single-branch https://github.com/hphuc15/baredrv sht3x
git clone --branch scd4x --single-branch https://github.com/hphuc15/baredrv scd4x
git clone --branch ze07  --single-branch https://github.com/hphuc15/baredrv ze07

Design Philosophy

Each driver:

  • Has no dependency on any HAL or SDK
  • Uses function pointers for I2C/SPI/UART abstraction
  • Is fully standalone and portable
  • Brings its own platform layer per target

Usage

  1. Clone the branch for the driver you need
  2. Implement the platform layer
  3. Initialize and use

See each driver's README for detailed instructions.

Notes

  • Drivers are independent → safe to use individually
  • No shared core or hidden dependencies
  • Suitable for bare-metal, RTOS, or any embedded platform
  • main only contains this README - actual driver code lives on each driver's branch

License

MIT

About

Lightweight, platform-independent drivers for embedded peripherals.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Contributors