# `stm32g0xx-hal`
_stm32g0xx-hal_ contains a multi device hardware abstraction on top of the
peripheral access API for the STMicro STM32G0 series microcontrollers. The
selection of the MCU is done by feature gates, typically specified by board
support crates.
## G0 hardware overview
Feature | Desc | G030 | G070 | G031 | G041 | G071 | G081
-- | -- | -- | -- | -- | -- | -- | --
TIM1 | 16bit up/down | 1 | 1 | 1 | 1 | 1 | 1
TIM2 | 32bit up/down | | | 1 | 1 | 1 | 1
TIM3 | 16bit up/down | 1 | 1 | 1 | 1 | 1 | 1
TIM6 | 16bit up | | 1 | | | 1 | 1
TIM7 | 16bit up | | 1 | | | 1 | 1
TIM14 | 16bit up | 1 | 1 | 1 | 1 | 1 | 1
TIM15 | 16bit up | | 1 | | | 1 | 1
TIM16 | 16bit up | 1 | 1 | 1 | 1 | 1 | 1
TIM17 | 16bit up | 1 | 1 | 1 | 1 | 1 | 1
LPTIM1 | 16bit up | | | 1 | 1 | 1 | 1
LPTIM2 | 16bit up | | | 1 | 1 | 1 | 1
COMP1 | Comparator | | | | | 1 | 1
COMP2 | Comparator | | | | | 1 | 1
DAC | | | | | | 1 | 1
UART1 | | 1 | 1 | 1 | 1 | 1 | 1
UART2 | | 1* | 1 | 1* | 1* | 1 | 1
UART3 | | | 1 | | | 1 | 1
UART4 | | | 1 | | | 1 | 1
LPUART | | | | 1 | 1 | 1 | 1
AES | | | | | 1 | | 1
RNG | | | | | 1 | | 1
UCPD1 | USB C Power Delivery | | | | | 1 | 1
UCPD2 | USB C Power Delivery | | | | | 1 | 1
VREFBUF | | | | 1 | 1 | 1 | 1
TS_CAL2 | Tsense calibration val @ 130 C | | | 1 | 1 | 1 | 1
DMA Channels | | 5 | 7 | 5 | 5 | 7 | 7
CEC | HDMI control | | | | | 1 | 1
## Usage
This crate will eventually contain support for multiple microcontrollers in the
stm32g0 family. Which specific microcontroller you want to build for has to be
specified with a feature, for example `stm32g070`.
### Building an Example
If you are compiling the crate on its own for development or running examples,
specify your microcontroller on the command line. For example:
```
cargo build --example blinky --features stm32g071
```
### Using as a Dependency
When using this crate as a dependency in your project, the microcontroller can
be specified as part of the `Cargo.toml` definition.
```
[dependencies.stm32g0xx-hal]
version = "0.1.1"
features = ["rt", "stm32g081"]
```
## Documentation
The documentation can be found at [docs.rs](https://docs.rs/stm32g0xx-hal/).
## License
Licensed under either of
- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or
http://www.apache.org/licenses/LICENSE-2.0)
- MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
at your option.
### Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
dual licensed as above, without any additional terms or conditions.
没有合适的资源?快使用搜索试试~ 我知道了~
STM32G0 系列微控制器的外设访问 API_rust_代码_相关文件_下载
共79个文件
rs:65个
yml:3个
raw:1个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 81 浏览量
2022-07-07
01:24:59
上传
评论
收藏 96KB ZIP 举报
温馨提示
stm32g0xx-hal在 STMicro STM32G0 系列微控制器的外设访问 API 之上包含多设备硬件抽象。MCU 的选择由功能门完成,通常由板支持板条箱指定。 用法 这个 crate 最终将包含对 stm32g0 系列中多个微控制器的支持。您要为其构建的特定微控制器必须使用功能指定,例如stm32g070. 构建示例 如果您自己编译 crate 以用于开发或运行示例,请在命令行上指定您的微控制器。例如: 更多详情、使用方法,请下载后阅读README.md文件
资源推荐
资源详情
资源评论
收起资源包目录
stm32g0xx-hal-main.zip (79个子文件)
stm32g0xx-hal-main
LICENSE-MIT 1KB
LICENSE-APACHE 11KB
openocd.cfg 164B
.github
workflows
rustfmt.yml 478B
ci.yml 613B
clippy.yml 529B
.gdbinit 91B
src
rcc
mod.rs 13KB
enable.rs 6KB
config.rs 3KB
clockout.rs 4KB
rng.rs 5KB
gpio.rs 21KB
prelude.rs 2KB
dmamux.rs 5KB
dma.rs 12KB
time.rs 2KB
spi.rs 9KB
flash
mod.rs 7KB
traits.rs 2KB
rtc.rs 4KB
power.rs 2KB
timer
pwm.rs 8KB
mod.rs 7KB
pins.rs 5KB
stopwatch.rs 3KB
delay.rs 5KB
opm.rs 5KB
qei.rs 3KB
analog
adc.rs 13KB
dac.rs 7KB
mod.rs 162B
comparator.rs 17KB
lib.rs 1KB
crc.rs 6KB
serial
mod.rs 69B
config.rs 6KB
usart.rs 22KB
watchdog.rs 3KB
exti.rs 5KB
i2c
mod.rs 1KB
blocking.rs 20KB
config.rs 3KB
Cargo.toml 2KB
memory.x 153B
examples
adc.rs 1KB
dac.rs 1KB
rtic.rs 2KB
flash.rs 1KB
uart-dma.rs 2KB
pwm.rs 1KB
ws2812_spi.rs 2KB
ferris.raw 11KB
comp.rs 1KB
blinky_timer.rs 669B
i2c.rs 954B
ir_remote.rs 2KB
st7735_lcd.rs 2KB
stopwatch.rs 2KB
clockout.rs 687B
rtic_low_power.rs 2KB
hello.rs 346B
sdcard.rs 3KB
comp_window.rs 1KB
blinky.rs 645B
uart.rs 818B
blinky_random.rs 1KB
button.rs 934B
blinky_delay.rs 640B
adc_ext_trig_double_dma_serial.rs 7KB
opm.rs 2KB
crc.rs 1KB
watchdog.rs 1003B
uart-fifo.rs 2KB
qei.rs 760B
.gitignore 41B
.cargo
config 221B
README.md 3KB
.vscode
settings.json 361B
共 79 条
- 1
资源评论
快撑死的鱼
- 粉丝: 1w+
- 资源: 9149
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功