# LPC8xx HAL [![crates.io](https://img.shields.io/crates/v/lpc8xx-hal.svg)](https://crates.io/crates/lpc8xx-hal) [![Documentation](https://docs.rs/lpc8xx-hal/badge.svg)](https://docs.rs/lpc8xx-hal) [![Build Status](https://travis-ci.com/lpc-rs/lpc8xx-hal.svg?branch=master)](https://travis-ci.com/lpc-rs/lpc8xx-hal)
## Introduction
Hardware Abstraction Layer (HAL) for the [NXP LPC800] series of microcontrollers, written in the [Rust] programming language. The [LPC82x] and [LPC845] are currently supported. LPC8xx HAL provides a high-level interface to the features of LPC800 MCUs, that is safe, convenient, and efficient.
LPC8xx HAL leverages Rust's type system to prevent common mistakes. Things like attempting to use a peripheral that has not been properly initialized, or attempting to assign conflicting functions to the same pin, will all result in compile-time errors.
This crate is an implementation of [embedded-hal]. Please consider if you can make your code platform-independent, by depending on [embedded-hal] instead of this library.
[NXP LPC800]: https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/lpc800-cortex-m0-plus-:MC_71785
[LPC82x]: https://www.nxp.com/products/processors-and-microcontrollers/arm-based-processors-and-mcus/lpc-cortex-m-mcus/lpc800-series-cortex-m0-plus-mcus/low-cost-microcontrollers-mcus-based-on-arm-cortex-m0-plus-cores:LPC82X
[LPC845]: https://www.nxp.com/products/processors-and-microcontrollers/arm-based-processors-and-mcus/lpc-cortex-m-mcus/lpc800-series-cortex-m0-plus-mcus/low-cost-microcontrollers-mcus-based-on-arm-cortex-m0-plus-cores:LPC84x
[Rust]: https://www.rust-lang.org/
[embedded-hal]: https://crates.io/crates/embedded-hal
## Status
LPC82x HAL is still under heavy development. It is lacking APIs for many peripherals, and the APIs that already exist are mostly incomplete.
**Do you need a feature that is currently missing? Please [open an issue]!**
The existing APIs are expected to evolve significantly in the future. API stability is *not* guaranteed, which means future versions might not be compatible with code using the current version.
## Usage
To include LPC8xx HAL in you project, add the following to your `Cargo.toml`:
``` toml
[dependencies]
lpc8xx-hal = "0.9"
```
If you want to use LPC8xx HAL in an application (as opposed to a library), there are additional things that need to be set up. Please refer to the [API Reference] for details.
To run one of the examples from this repository, please adapt the following command if you're using an LPC845-BRK board:
```
cargo embed lpc845 --example gpio_delay --features 845-rt
```
Or adapt the following command if using an LPCXpresso824-MAX board:
```
cargo embed lpc82x --example gpio_delay --features 82x-rt
```
## Documentation
The **[API Reference]** should contain everything you need to use this library. If you think that anything's missing, please [open an issue].
For functionality that is not yet covered by this crate, you may need to fall back to [`lpc82x-pac`]/[`lpc845-pac`]. Please refer to their respective documentation if necessary.
The authoritative source on the supported MCUs are their respective user manuals, available from NXP.
[API Reference]: https://docs.rs/lpc8xx-hal
[`lpc82x-pac`]: https://crates.io/crates/lpc82x-pac
[`lpc845-pac`]: https://crates.io/crates/lpc845-pac
## Help Wanted
Are you familiar with the LPC8xx family? We need your help, even if you are not using LPC8xx HAL. Some design issues require feedback from people familiar with the hardware and how it is used. Check out the [help wanted] tag on the issue tracker.
Do you want to contribute to LPC8xx HAL? There's a number of [good first issues] on the issue tracker. If you're unsure about anything, check out our documentation on [how to contribute], or just ask!
[help wanted]: https://github.com/lpc-rs/lpc8xx-hal/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22
[good first issues]: https://github.com/lpc-rs/lpc8xx-hal/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22
[how to contribute]: https://github.com/lpc-rs/lpc8xx-hal/blob/master/CONTRIBUTING.md
## License
This project is open source software, licensed under the terms of the [Zero Clause BSD License][] (0BSD, for short). This basically means you can do anything with the software, without any restrictions, but you can't hold the authors liable for problems.
See [LICENSE] for full details.
[Zero Clause BSD License]: https://opensource.org/licenses/FPL-1.0.0
[LICENSE]: https://github.com/lpc-rs/lpc8xx-hal/blob/master/LICENSE
**Supported by [Braun Embedded](https://braun-embedded.com/)**
[open an issue]: https://github.com/lpc-rs/lpc8xx-hal/issues/new
没有合适的资源?快使用搜索试试~ 我知道了~
NXP LPC800 系列微控制器的硬件抽象层 (HAL) ,用 Rust 编程语言编写
共130个文件
rs:100个
toml:7个
stderr:5个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 42 浏览量
2022-07-08
02:16:38
上传
评论
收藏 166KB ZIP 举报
温馨提示
介绍 NXP LPC800系列微控制器的硬件抽象层 (HAL) ,用Rust编程语言编写。目前支持LPC82x和LPC845。LPC8xx HAL 为 LPC800 MCU 的特性提供了高级接口,安全、方便、高效。 LPC8xx HAL 利用 Rust 的类型系统来防止常见错误。尝试使用未正确初始化的外围设备,或尝试将冲突的功能分配给同一引脚等事情都会导致编译时错误。 这个 crate 是embedded-hal的一个实现。请考虑是否可以通过依赖Embedded-hal而不是此库来使您的代码独立于平台。 更多详情、使用方法,请下载后阅读README.md文件
资源详情
资源评论
资源推荐
收起资源包目录
NXP LPC800 系列微控制器的硬件抽象层 (HAL) ,用 Rust 编程语言编写
(130个子文件)
openocd_84x.cfg 248B
openocd_82x.cfg 143B
CODEOWNERS 155B
openocd.gdb 193B
.gitignore 85B
settings.json 148B
LICENSE 683B
CHANGELOG.md 12KB
README.md 5KB
CONTRIBUTING.md 2KB
README.md 1KB
gpio.rs 35KB
mod.rs 23KB
lib.rs 19KB
pin.rs 19KB
peripheral.rs 19KB
peripheral.rs 17KB
transfer.rs 15KB
movable_functions.rs 14KB
peripheral.rs 12KB
tx.rs 12KB
master.rs 11KB
rx.rs 10KB
pmu.rs 10KB
functions.rs 8KB
slave.rs 7KB
peripheral.rs 7KB
gen.rs 7KB
wkt.rs 7KB
flags.rs 7KB
sleep.rs 6KB
adc.rs 6KB
interrupt.rs 6KB
fixed_functions.rs 6KB
channels.rs 6KB
clock.rs 5KB
dma.rs 5KB
build.rs 5KB
gen.rs 5KB
i2c_master_slave_dma.rs 5KB
reg_proxy.rs 5KB
settings.rs 5KB
ticks.rs 5KB
pmu.rs 4KB
buffer.rs 4KB
delay.rs 4KB
i2c_vl53l0x.rs 4KB
i2c_eeprom.rs 4KB
i2c_master_slave.rs 4KB
channel.rs 4KB
channel.rs 4KB
usart.rs 4KB
clock.rs 3KB
peripheral.rs 3KB
assignment.rs 3KB
clock_source.rs 3KB
clock.rs 3KB
instances.rs 3KB
peripheral.rs 3KB
frg.rs 3KB
instances.rs 3KB
error.rs 3KB
handle.rs 2KB
gpio_sleep.rs 2KB
ctimer_fade.rs 2KB
instances.rs 2KB
ctimer_blink.rs 2KB
interrupts.rs 2KB
spi_apa102.rs 2KB
gpio_generic.rs 2KB
mod.rs 2KB
state.rs 2KB
mod.rs 2KB
clock.rs 2KB
state.rs 2KB
mod.rs 2KB
usart_dma.rs 2KB
interrupts.rs 2KB
pinint.rs 2KB
gpio_timer.rs 2KB
gpio_dynamic.rs 2KB
adc.rs 2KB
gpio_simple.rs 2KB
gpio_delay.rs 2KB
peripheral.rs 1KB
gpio_input.rs 1KB
descriptors.rs 1KB
gen.rs 1KB
rtic.rs 1KB
assign-multiple-output-functions.rs 1KB
peripheral.rs 1KB
mod.rs 1KB
traits.rs 1KB
gen.rs 1KB
gen.rs 1KB
state.rs 949B
unassign-unassigned-output-function.rs 847B
unassign-unassigned-input-function.rs 843B
assign-function-to-multiple-pins.rs 827B
unassign-function-from-wrong-pin.rs 823B
共 130 条
- 1
- 2
快撑死的鱼
- 粉丝: 1w+
- 资源: 9156
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0