Community SVD file, peripheral access crate in embedde Rust for WinnerMicro W800, W801 & W806 chip

Overview

W806 Rust支持库(外设访问层)

这个项目包含W80x系列芯片的Rust外设支持库。它提供基于寄存器的外设访问支持。文档链接:这里

使用外设访问层支持库,可以在不记忆地址、值含义的前提下,初步调试和访问芯片外设。通常你不会直接使用这个库,而是使用封装好的硬件中间层(有时候叫HAL)库,它会提供更接近高级语言语义的访问方法。

项目仍然在开发中,欢迎各位贡献者参与到项目里来!

Rust支持库说明

嵌入式Rust的生态分为两层:外设访问和硬件中间层。

外设访问层提供一系列的Rust结构体,允许我们通过高级语言的方式访问寄存器,无需记忆复杂的地址和初始值。硬件中间层是对前者的包装,它将寄存器解释为Rust语言的外设概念,方便使用所有权、生命周期的Rust语言检查项,并提供embedded-hal统一抽象接口的实现。

如果您是惯用C语言的开发者——您可以理解为外设访问层相当于头文件,硬件中间层约等于C语言实现文件。

Rust语言的外设访问层可以由svd2rust软件生成。虽然svd文件是ARM的标准,但是我们发现,用它描述其它指令集架构的寄存器外设仍然是合适的。所以在CSKY指令集的Rust支持中,我们仍然选用svd文件来描述我们的外设。

版权

作为开源项目,本项目的SVD文件和Rust源码均遵守Mulan-PSL v2(“木兰宽松许可证,第2版”)开源协议。未尽事宜请详阅协议文件

本项目的贡献者如下,按昵称的字母顺序排序。感谢贡献者们!

apeng2012 
   
    
luojia65 
    

    
   
Issues
  • add RTC

    add RTC

    null

    opened by apeng2012 10
  • Datasheet 与 SDK 中寄存器内容不一致

    Datasheet 与 SDK 中寄存器内容不一致

    在PMU中断源寄存器的RTC中断标志位。 Datasheet 是 [5] SDK 中 #define PMU_IF_RTC_Pos (4)

    以 SDK 为准?

    opened by apeng2012 1
  • 上手

    上手

    比较看好rust嵌入式 想贡献一点时间在这上面 怎么上手

    opened by CQADu 2
  • 初学者的疑惑

    初学者的疑惑

    1. 这个项目已经结束了吗?我看到最后一次更新是在两天前,还需要志愿者做contribution吗
    2. 作为初学者,我不是很明白我需要怎么做,有大哥可以提供相关的介绍和书籍、资料、链接等吗,例如我不是很明白svd文件是什么,打开看的时候发现是一个XML文件,里面有一些描述,根据README文档猜测这个文件会生成一些Rust代码。我应当去哪里寻找什么样的外设和相关的信息填入呢?
    opened by yingmanwumen 2
  • 任务认领帖

    任务认领帖

    欢迎各位贡献者们参与w806 svd文件项目!

    为了避免冲突,请您在为外设编写svd文件前,在此帖下回复您将要编写的外设。同时,在编写下一个外设前,请查看此贴,方便和贡献者们沟通,以及避免重复工作。

    如果您是第一次编写svd文件,这里有一个仓库,包含了许多正确编写的svd文件,以供参考:链接;这是一个hi3861芯片的svd文件,供参考:链接

    在编写之前,请阅读w800系列芯片的寄存器文档。有时,sdk的c语言头文件也能提供帮助。

    再次感谢各位贡献者的支持!

    任务列表

    • [ ] ADC
    • [ ] DMA
    • [ ] FLASH
    • [x] GPIO{A,B}
    • [ ] I2C
    • [x] RTC、PMU(#3
    • [ ] PWM
    • [x] RCC
    • [ ] RSA
    • [ ] SPI
    • [ ] TIMER
    • [ ] TOUCH
    • [ ] UART[0-6]
    • [ ] WDOG
    opened by luojia65 2
Owner
Luo Jia
Pura Rustulo (Pure Rustacean) kaj Esperantisto! @luojia65:matrix.org
Luo Jia
📦 Crate Protocol allows anyone to create, manage, and trade a tokenized basket of assets, which we refer to as a Crate.

?? Crate Protocol Crate Protocol allows anyone to create, manage, and trade a tokenized basket of assets, which we refer to as a Crate. A Crate is alw

Crate Protocol 18 Nov 27, 2021
unFlow is a Design as Code implementation, a DSL for UX & backend modeling. DSL to Sketch file, Sketch to DSL, DSL to code.

unflow 是一个低代码、无代码设计语言。unFlow is a Design as Code implementation, a DSL for UX & backend modeling. DSL to Sketch file, Sketch to DSL, DSL to code.

Inherd OS Team (硬核开源小组) 56 Nov 10, 2021
Rust crate for parsing stivale and stivale 2 structures.

stivale-rs Rust crate for parsing stivale and stivale 2 structures. Resources Stivale v2 Specification Stivale Specification License Licensed under ei

Anhad Singh 5 Nov 10, 2021
A simple entity-component-system crate for rust with serialization support

Gallium A simple entity-component-system crate for rust with serialization support Usage You can include the library using carge: [dependencies] galli

null 7 Aug 31, 2021
Rust crate to generate, manipulate and traverse trees.

SOCAREL Rust crate to generate, manipulate and traverse trees. It provides iterators for eight different traversal algorithms. Add and remove nodes in

Andreu 8 Nov 14, 2021
Jonathan Kelley 21 Sep 24, 2021
A translation of Brendan Galea's Vulkan tutorial into Rust using the ash crate

Rust Light Vulkan Engine This is a translation of Brendan Galea's Vulkan tutorial into rust using the Ash crate. Original tutorial: Brendan Galea's Yo

Mot 6 Nov 16, 2021
This crate provides a convenient macro that allows you to generate type wrappers that promise to always uphold arbitrary invariants that you specified.

prae This crate provides a convenient macro that allows you to generate type wrappers that promise to always uphold arbitrary invariants that you spec

null 36 Sep 12, 2021
This crate defines a single macro that is a brainfunct compile-time interpreter.

Compile Protection This crate defines a single macro that is a brainfunct compile-time interpreter. One example is as follows #![recursion_limit = "18

John Marsden 6 Sep 26, 2021
secmem-proc is a crate designed to harden a process against low-privileged attackers running on the same system trying to obtain secret memory contents of the current process.

secmem-proc is a crate designed to harden a process against low-privileged attackers running on the same system trying to obtain secret memory contents of the current process. More specifically, the crate disables core dumps and tries to disable tracing on unix-like OSes.

null 1 Nov 5, 2021
Example of structuring a proc macro crate for testability

testing-proc-macros Example of structuring a proc macro crate for testability. See accompanying blog post for details. License Licensed under either o

Ferrous Systems 3 Oct 22, 2021
A stupid macro that compiles and executes Rust and spits the output directly into your Rust code

inline-rust This is a stupid macro inspired by inline-python that compiles and executes Rust and spits the output directly into your Rust code. There

William 1 Nov 22, 2021
🐀 Building a federated alternative to reddit in rust

Lemmy A link aggregator / Reddit clone for the fediverse. Join Lemmy · Documentation · Report Bug · Request Feature · Releases · Code of Conduct About

LemmyNet 5.6k Nov 29, 2021
Applied offensive security with Rust

Black Hat Rust - Early Access Deep dive into offensive security with the Rust programming language Buy the book now! Summary Whether in movies or main

Sylvain Kerkour 1k Nov 24, 2021
Rholang runtime in rust

Rholang Runtime A rholang runtime written in Rust.

Jerry.Wang 15 Aug 4, 2021
Easy-to-use optional function arguments for Rust

OptArgs uses const generics to ensure compile-time correctness. I've taken the liberty of expanding and humanizing the macros in the reference examples.

Jonathan Kelley 31 Sep 9, 2021
A language server for lua written in rust

lua-analyzer lua-analyzer is a lsp server for lua. This is mostly for me to learn the lsp protocol and language analysis so suggestions are helpful. T

null 55 Oct 12, 2021
Rust library that can be reset if you think it's slow

GoodbyeKT Rust library that can be reset if you think it's slow

null 40 Oct 17, 2021
Cargo - The Rust package manager

Cargo downloads your Rust project’s dependencies and compiles your project.

The Rust Programming Language 7.5k Nov 30, 2021