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 
    

    
   
You might also like...
A translation of Brendan Galea's Vulkan tutorial into Rust using the ash crate
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

A high-level Rust crate around the Discord API, aimed to be easy and straight-forward to use.
A high-level Rust crate around the Discord API, aimed to be easy and straight-forward to use.

rs-cord A high-level Rust crate around the Discord API, aimed to be easy and straight-forward to use. Documentation • Crates.io • Discord Navigation M

A Rust proc-macro crate which derives functions to compile and parse back enums and structs to and from a bytecode representation

Bytecode A simple way to derive bytecode for you Enums and Structs. What is this This is a crate that provides a proc macro which will derive bytecode

This crate converts Rust compatible regex-syntax to Vim's NFA engine compatible regex.

This crate converts Rust compatible regex-syntax to Vim's NFA engine compatible regex.

An `abilists` parser crate for Rust

An `abilists` parser crate for Rust

Chains - a bot written in Rust using the serenity crate

Chains (Rusty) Chains is a bot written in Rust using the serenity crate. Chains primarily focuses on easy to set up, easy to use moderation tools such

A Rust crate to expressively declare bitfield-like structs

proc-bitfield A Rust crate to expressively declare bitfield-like structs, automatically ensuring their correctness at compile time and declaring acces

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

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

Comments
  • 初学者的疑惑

    初学者的疑惑

    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
Community showcase and examples of Actix ecosystem usage.

Actix Examples Curated examples using the Actix ecosystem. Community Showcase Merino: Web service for Firefox Suggest lemmy: A federated alternative t

Actix 2.9k Dec 31, 2022
Bot oficial da codify community.

Bot do discord oficial da codify community. Como eu posso rodar ele? Requisitos Compilador do Rust Token do discord Arquivo de configuração O .env é u

Codify Community 5 Dec 15, 2022
A library to access BGPKIT Broker API and enable searching for BGP data archive files over time from public available data sources.

BGPKIT Broker BGPKIT Broker is a online data API service that allows users to search for publicly available BGP archive files by time, collector, proj

BGPKIT 10 Nov 30, 2022
Allow raw pointer access without those pesky unsafe blocks everywhere!

Allow raw pointer access without those pesky unsafe blocks everywhere!

null 1 Jan 23, 2022
📦 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 63 Oct 31, 2022
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 (硬核开源小组) 70 Nov 27, 2022
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 12 Dec 20, 2022
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 33 Dec 6, 2022