Skip to content

Commit db626c0

Browse files
authored
Svd2rust 0.16.1 (#8)
* deleting unneeded lib.rs * Generated using svd2rust 0.16.1 * Updated version * Updated dependencies * updated repo location * adding keywords * adding shebangs * Removed inclusion of ECAT0 * Improve CI * adding probot auto merge config * Going to github actions instead of Travis
1 parent ac32775 commit db626c0

File tree

1,180 files changed

+271183
-439985
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,180 files changed

+271183
-439985
lines changed

.github/auto-merge.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
mergeMethod: squash
2+
updateBranch: true
3+
deleteBranchAfterMerge: true
4+
reportStatus: true
5+
blockingLabels:
6+
- dependencies
7+
rules:
8+
- requiredLabels:
9+
- merge

.github/workflows/doc-publish.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Doc Publish
2+
on:
3+
push:
4+
branches:
5+
- master
6+
7+
jobs:
8+
build:
9+
name: Build Docs
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v1
13+
- name: Install Toolchain
14+
uses: actions-rs/toolchain@v1
15+
with:
16+
toolchain: 'stable'
17+
target: 'x86_64-unknown-linux-gnu'
18+
- name: Cargo Doc
19+
uses: actions-rs/cargo@v1
20+
with:
21+
command: doc
22+
args: --verbose --no-deps --document-private-items

.github/workflows/rust.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Rust
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build:
10+
strategy:
11+
matrix:
12+
rust-channel: [ 'stable', 'nightly' ]
13+
rust-target: [ 'x86_64-unknown-linux-gnu', 'thumbv7em-none-eabi' ]
14+
name: ${{ matrix.rust-channel }}-${{ matrix.rust-target }}
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@master
18+
- name: Install toolchain
19+
uses: actions-rs/toolchain@v1
20+
with:
21+
toolchain: ${{ matrix.rust-channel }}
22+
target: ${{ matrix.rust-target }}
23+
override: true
24+
- name: Cargo Check
25+
uses: actions-rs/cargo@v1
26+
with:
27+
command: check
28+
args: --target ${{ matrix.rust-target }}
29+
- name: Cargo Build
30+
uses: actions-rs/cargo@v1
31+
with:
32+
command: build
33+
args: --verbose --target ${{ matrix.rust-target }}

.travis.yml

Lines changed: 0 additions & 49 deletions
This file was deleted.

Cargo.toml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
[package]
22
name = "xmc4800"
3-
version = "0.1.0"
3+
version = "0.2.0"
44
description = "XMC peripheral library for XMC4800 generated from SVD"
55
readme = "README.md"
66
authors = ["Lucas Brendel <lucasbrendel@gmail.com>"]
7-
repository = "https://github.com/lucasbrendel/xmc4800"
7+
repository = "https://github.com/xmc-rs/xmc4800"
88
license = "MIT"
9+
keywords = ["cortex-m", "infineon", "arm", "xmc4x"]
910
documentation = "https://docs.rs/xmc4800"
1011

1112
[dependencies]
12-
cortex-m = "0.5.8"
13-
bare-metal = "0.2.4"
14-
vcell = "0.1.0"
13+
cortex-m = "0.6.1"
14+
bare-metal = "0.2.5"
15+
vcell = "0.1.2"
1516

1617
[dependencies.cortex-m-rt]
1718
optional = true
18-
version = "0.6.7"
19+
version = "0.6.10"
1920

2021
[features]
2122
rt = ["cortex-m-rt"]

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1-
# xmc4800
1+
# XMC4800
22
XMC4800 Peripheral interface library generated from an SVD
3+
4+
## WARNING
5+
6+
The inclusion of EtherCAT has been removed from `src/lib.rs`. This is due to an issue either with the SVD file or the generation of the code using svd2rust. There is no support at this time until a fix can be made. This has not been tested on hardware to ensure that nothing else has been impacted.

ci/install.sh

Lines changed: 0 additions & 27 deletions
This file was deleted.

ci/script.sh

Lines changed: 0 additions & 24 deletions
This file was deleted.

src/can.rs

Lines changed: 87 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
#[doc = r" Register block"]
1+
#[doc = r"Register block"]
22
#[repr(C)]
33
pub struct RegisterBlock {
44
#[doc = "0x00 - CAN Clock Control Register"]
55
pub clc: CLC,
6-
_reserved0: [u8; 4usize],
6+
_reserved1: [u8; 4usize],
77
#[doc = "0x08 - Module Identification Register"]
88
pub id: ID,
99
#[doc = "0x0c - CAN Fractional Divider Register"]
1010
pub fdr: FDR,
11-
_reserved1: [u8; 240usize],
11+
_reserved3: [u8; 240usize],
1212
#[doc = "0x100 - List Register"]
1313
pub list: [LIST; 16],
1414
#[doc = "0x140 - Message Pending Register"]
1515
pub mspnd: [MSPND; 8],
16-
_reserved2: [u8; 32usize],
16+
_reserved5: [u8; 32usize],
1717
#[doc = "0x180 - Message Index Register"]
1818
pub msid: [MSID; 8],
19-
_reserved3: [u8; 32usize],
19+
_reserved6: [u8; 32usize],
2020
#[doc = "0x1c0 - Message Index Mask Register"]
2121
pub msimask: MSIMASK,
2222
#[doc = "0x1c4 - Panel Control Register"]
@@ -26,63 +26,105 @@ pub struct RegisterBlock {
2626
#[doc = "0x1cc - Module Interrupt Trigger Register"]
2727
pub mitr: MITR,
2828
}
29-
#[doc = "CAN Clock Control Register"]
30-
pub struct CLC {
31-
register: ::vcell::VolatileCell<u32>,
32-
}
29+
#[doc = "CAN Clock Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [clc](clc) module"]
30+
pub type CLC = crate::Reg<u32, _CLC>;
31+
#[allow(missing_docs)]
32+
#[doc(hidden)]
33+
pub struct _CLC;
34+
#[doc = "`read()` method returns [clc::R](clc::R) reader structure"]
35+
impl crate::Readable for CLC {}
36+
#[doc = "`write(|w| ..)` method takes [clc::W](clc::W) writer structure"]
37+
impl crate::Writable for CLC {}
3338
#[doc = "CAN Clock Control Register"]
3439
pub mod clc;
35-
#[doc = "Module Identification Register"]
36-
pub struct ID {
37-
register: ::vcell::VolatileCell<u32>,
38-
}
40+
#[doc = "Module Identification Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [id](id) module"]
41+
pub type ID = crate::Reg<u32, _ID>;
42+
#[allow(missing_docs)]
43+
#[doc(hidden)]
44+
pub struct _ID;
45+
#[doc = "`read()` method returns [id::R](id::R) reader structure"]
46+
impl crate::Readable for ID {}
3947
#[doc = "Module Identification Register"]
4048
pub mod id;
41-
#[doc = "CAN Fractional Divider Register"]
42-
pub struct FDR {
43-
register: ::vcell::VolatileCell<u32>,
44-
}
49+
#[doc = "CAN Fractional Divider Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [fdr](fdr) module"]
50+
pub type FDR = crate::Reg<u32, _FDR>;
51+
#[allow(missing_docs)]
52+
#[doc(hidden)]
53+
pub struct _FDR;
54+
#[doc = "`read()` method returns [fdr::R](fdr::R) reader structure"]
55+
impl crate::Readable for FDR {}
56+
#[doc = "`write(|w| ..)` method takes [fdr::W](fdr::W) writer structure"]
57+
impl crate::Writable for FDR {}
4558
#[doc = "CAN Fractional Divider Register"]
4659
pub mod fdr;
47-
#[doc = "List Register"]
48-
pub struct LIST {
49-
register: ::vcell::VolatileCell<u32>,
50-
}
60+
#[doc = "List Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [list](list) module"]
61+
pub type LIST = crate::Reg<u32, _LIST>;
62+
#[allow(missing_docs)]
63+
#[doc(hidden)]
64+
pub struct _LIST;
65+
#[doc = "`read()` method returns [list::R](list::R) reader structure"]
66+
impl crate::Readable for LIST {}
5167
#[doc = "List Register"]
5268
pub mod list;
53-
#[doc = "Message Pending Register"]
54-
pub struct MSPND {
55-
register: ::vcell::VolatileCell<u32>,
56-
}
69+
#[doc = "Message Pending Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [mspnd](mspnd) module"]
70+
pub type MSPND = crate::Reg<u32, _MSPND>;
71+
#[allow(missing_docs)]
72+
#[doc(hidden)]
73+
pub struct _MSPND;
74+
#[doc = "`read()` method returns [mspnd::R](mspnd::R) reader structure"]
75+
impl crate::Readable for MSPND {}
76+
#[doc = "`write(|w| ..)` method takes [mspnd::W](mspnd::W) writer structure"]
77+
impl crate::Writable for MSPND {}
5778
#[doc = "Message Pending Register"]
5879
pub mod mspnd;
59-
#[doc = "Message Index Register"]
60-
pub struct MSID {
61-
register: ::vcell::VolatileCell<u32>,
62-
}
80+
#[doc = "Message Index Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [msid](msid) module"]
81+
pub type MSID = crate::Reg<u32, _MSID>;
82+
#[allow(missing_docs)]
83+
#[doc(hidden)]
84+
pub struct _MSID;
85+
#[doc = "`read()` method returns [msid::R](msid::R) reader structure"]
86+
impl crate::Readable for MSID {}
6387
#[doc = "Message Index Register"]
6488
pub mod msid;
65-
#[doc = "Message Index Mask Register"]
66-
pub struct MSIMASK {
67-
register: ::vcell::VolatileCell<u32>,
68-
}
89+
#[doc = "Message Index Mask Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [msimask](msimask) module"]
90+
pub type MSIMASK = crate::Reg<u32, _MSIMASK>;
91+
#[allow(missing_docs)]
92+
#[doc(hidden)]
93+
pub struct _MSIMASK;
94+
#[doc = "`read()` method returns [msimask::R](msimask::R) reader structure"]
95+
impl crate::Readable for MSIMASK {}
96+
#[doc = "`write(|w| ..)` method takes [msimask::W](msimask::W) writer structure"]
97+
impl crate::Writable for MSIMASK {}
6998
#[doc = "Message Index Mask Register"]
7099
pub mod msimask;
71-
#[doc = "Panel Control Register"]
72-
pub struct PANCTR {
73-
register: ::vcell::VolatileCell<u32>,
74-
}
100+
#[doc = "Panel Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [panctr](panctr) module"]
101+
pub type PANCTR = crate::Reg<u32, _PANCTR>;
102+
#[allow(missing_docs)]
103+
#[doc(hidden)]
104+
pub struct _PANCTR;
105+
#[doc = "`read()` method returns [panctr::R](panctr::R) reader structure"]
106+
impl crate::Readable for PANCTR {}
107+
#[doc = "`write(|w| ..)` method takes [panctr::W](panctr::W) writer structure"]
108+
impl crate::Writable for PANCTR {}
75109
#[doc = "Panel Control Register"]
76110
pub mod panctr;
77-
#[doc = "Module Control Register"]
78-
pub struct MCR {
79-
register: ::vcell::VolatileCell<u32>,
80-
}
111+
#[doc = "Module Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [mcr](mcr) module"]
112+
pub type MCR = crate::Reg<u32, _MCR>;
113+
#[allow(missing_docs)]
114+
#[doc(hidden)]
115+
pub struct _MCR;
116+
#[doc = "`read()` method returns [mcr::R](mcr::R) reader structure"]
117+
impl crate::Readable for MCR {}
118+
#[doc = "`write(|w| ..)` method takes [mcr::W](mcr::W) writer structure"]
119+
impl crate::Writable for MCR {}
81120
#[doc = "Module Control Register"]
82121
pub mod mcr;
83-
#[doc = "Module Interrupt Trigger Register"]
84-
pub struct MITR {
85-
register: ::vcell::VolatileCell<u32>,
86-
}
122+
#[doc = "Module Interrupt Trigger Register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [mitr](mitr) module"]
123+
pub type MITR = crate::Reg<u32, _MITR>;
124+
#[allow(missing_docs)]
125+
#[doc(hidden)]
126+
pub struct _MITR;
127+
#[doc = "`write(|w| ..)` method takes [mitr::W](mitr::W) writer structure"]
128+
impl crate::Writable for MITR {}
87129
#[doc = "Module Interrupt Trigger Register"]
88130
pub mod mitr;

0 commit comments

Comments
 (0)