Other

项目介绍

nimaltd/master-modbus 是一个托管在 GitHub 上的开源项目,主要使用 C 编写,采用 Other 许可证,目前获得 109 个 Star、30 次 Fork。

仓库全名
nimaltd/master-modbus
开源许可证
Other
Star 数
109
Fork 数
30
未关闭 Issue
4

README 摘要

STM32 Master MODBUS LL Library http://www.github.com/NimaLTD https://www.instagram.com/github.nimaltd/ https://www.youtube.com/@nimaltd This is the MMODBUS STM32 LL Library [x] support MODBUS RTU [ ] support MODBUS ASCII Tested devices [ ] F0 [ ] F1 [ ] F2 [ ] F3 [x] F4 [ ] F7 [ ] H7 How to use this Library: Select "General peripheral Initalizion as a pair of '.c/.h' file per peripheral" on project settings. Enable…

完整内容见 GitHub 原始 README 或本页 。

常见问题

master-modbus 用什么语言开发?

主要使用 C 编写,采用 Other 许可证,目前有 109 个 Star。

master-modbus 可以免费商用吗?

仓库标注的许可证为 Other,商用前请先阅读仓库 LICENSE 文件确认授权范围。

如何获取 master-modbus 的源码?

可以直接克隆仓库:git clone https://github.com/nimaltd/master-modbus.git;安装与运行步骤见仓库 README。

master-modbus 最近还在维护吗?

仓库最近一次更新为 2025年3月17日,当前有 4 个未关闭 Issue;Star 数为 109,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

master modbus library for STM32 LL

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

语言占比

C

贡献者

README

STM32 Master MODBUS LL Library

ko-fi

This is the MMODBUS STM32 LL Library

  • support MODBUS RTU
  • support MODBUS ASCII

Tested devices

  • F0
  • F1
  • F2
  • F3
  • F4
  • F7
  • H7

How to use this Library:

  • Select “General peripheral Initalizion as a pair of ‘.c/.h’ file per peripheral” on project settings.
  • Enable USART and enable interrupt.
  • Config USART.
  • Enable TX DMA is optional.
  • Enable FREERTOS is optional.
  • Enable a gpio as output for RS485 control pin.
  • Add mmodbus_callback() into USART IRQ callback.
  • If Enabled TX DMA, Add mmodbus_callback_txDMA() into DMA callback.
  • Include Header and source into your project.
  • Config “mmodbusConfig.h”.
  • Call mmodbus_init(…).
#include "mmodbus.h"

int main()
{
  mmodbus_init(2500);
  mmodbus_writeCoil(10, 0, 1);
  
  while(1)
  {
    
  }
}

in stm32f4xx_it.c

void USART3_IRQHandler(void)
{
  mmodbus_callback();
}

// if use tx dma
void DMA1_Stream3_IRQHandler(void)
{
  mmodbus_callback_txDMA();
}


评论

暂无评论