GitHub 您所在的位置:网站首页 halpp意思 GitHub

GitHub

#GitHub| 来源: 网络整理| 查看: 265

halpp

Just another C++ hardware abstraction Layer 😅

⚠️ Needs adaptation to std::hardware design and Silica

⚠️ Experimental, use at your own risk.

Feature status ❌ - Broken or not implemented ❓ - Not tested ✅ - Works Target F030 F042 F103 F401 F405 F407 F429 ATmega328p Compiles ✅ ❓ ❓ ✅ ❌ ✅ ❓ ❓ Blinks LED ✅ ❓ ❓ ❓ ❌ ✅ ❓ ❓ Delay works ❓ ❓ ❓ ❓ ❌ ✅ ❓ ❌ Interrupts ✅ ❓ ❓ ❓ ❌ ✅ ❓ ❓ Example #include #include #include int main() { hal::init(); hal::afio.enable(); #if defined(STM32F407) hal::port.enable(); hal::port.enable(); auto pin = hal::port.get_pin(1); auto int_pin = hal::port.get_pin(4); #else hal::port.enable(); auto pin = hal::port.get_pin(0); auto int_pin = hal::port.get_pin(5); #endif pin->mode(hal::pin_mode::OUTPUT_50M); pin->reset(); int_pin->mode(hal::pin_mode::INPUT); int_pin->interrupt(hal::FALLING, [&pin](){ pin->toggle(); }); while(1); }


【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有