用于将位流闪烁到AVR微控制器的最小工具集。

avr_helpers的Python项目详细描述


#AVR_帮助程序

此包提供用于与[avr][1]交互的帮助程序类。 工具链。它包括一个windows版的avrdude和linux版的副本(32位 以及[Arduino 1.0.5]中的avrdude.conf文件 IDE][2]。这允许单独刷新compile.hex固件文件

[1]:http://en.wikipedia.org/wiki/Atmel_AVR [2]:http://arduino.cc/en/main/software

###avrdudeAPI##

avrdude类实现了一个api,用于:

  • Scanning available serial ports for a connected device.
  • Flashing a .hex bit-stream file to an AVR device.

###avrdudeapi用法

>>> from avr_helpers import AvrDude
>>> AvrDude?
Type:            type
String form:     <class ‘avr_helpers.AvrDude’>
File:            ...
Init definition: AvrDude(self, protocol, microcontroller, baud_rate, conf_path=None, port=None)
Docstring:       ...
>>> avr_dude = AvrDude(‘arduino’, ‘atmega168’, ‘19200’)
>>> # `-D` disables erase cycle to speed up programming.
>>> stdout, stderr = avr_dude.flash(‘blink.hex’, [‘-D’])
>>> print stdout
>>> print stderr

avrdude-x64: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude-x64: Device signature = 0x1e9406 avrdude-x64: reading input file “blink.hex” avrdude-x64: writing flash (1056 bytes):

Writing | ################################################## | 100% 0.76s

avrdude-x64: 1056 bytes of flash written avrdude-x64: verifying flash memory against blink.hex: avrdude-x64: load data flash data from input file blink.hex: avrdude-x64: input file blink.hex contains 1056 bytes avrdude-x64: reading on-chip flash data:

Reading | ################################################## | 100% 0.68s

avrdude-x64: verifying … avrdude-x64: 1056 bytes of flash verified

avrdude-x64 done. Thank you.

注意,由于ArduinoIDE中的avrdude.conf文件包含在 avr_helpers包,可以使用arduino协议,使 将预编译的.hex文件闪烁到Arduino设备。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java API以编程方式创建ARM模板   java是否有合适的模式或方法来遍历数据和动态构造对象?   oop((类名)InstanceName)在java中有什么用途?   接口Java类方法未初始化   Java类:静态字段在内存中的位置?   java错误:服务类没有零参数构造函数   使用JDBC模板的java参数化sql查询   安卓致命异常:主java。lang.RuntimeException:   amazon web服务使用IAM角色从java访问AWS S3   java如何在Gradle中使用ojdbc   带块的Java类实例化   java日志记录是否有很大的开销,即使它是关闭的?   java JetBrains@Contract using字段   BluetoothGattCallback中从未调用java onDescriptorWrite()   java HttpMessageConverter无效的EOF处理   java在安卓的主活动类中调用另一个类   java防止在spring hibernate中存储重复值的正确方法   java如何在JAVADOC注释中使用变量?