pic32_config_sector/
lib.rs

1//! Calculate constant values for PIC32 configuration words.
2//!
3//! This crate defines const structures that can be used to calculate values of
4//! configuration words to be stored in the configuration word section of a
5//! Flash memory image for PIC32 microcontrollers. The `build()` method returns
6//! a constant struct to be output to the configuration word section (typically
7//! `.configsfrs`).
8//!
9//! Example:
10//! ```
11//! use pic32_config_sfrs::pic32mx2xx::*;
12//!
13//! #[link_section = ".configsfrs"]
14//! #[used]
15//! pub static CONFIGSFRS: ConfigSector = ConfigSector::default()
16//!     .FVBUSONIO(FVBUSONIO::OFF)
17//!     .FUSBIDIO(FUSBIDIO::OFF)
18//!     .IOL1WAY(IOL1WAY::OFF)
19//!     .PMDL1WAY(PMDL1WAY::OFF)
20//!     .FPLLIDIV(FPLLIDIV::DIV_2)
21//!     .FPLLMUL(FPLLMUL::MUL_20)
22//!     .FPLLODIV(FPLLODIV::DIV_2)
23//!     .FNOSC(FNOSC::FRCPLL)
24//!     .FSOSCEN(FSOSCEN::OFF)
25//!     .FPBDIV(FPBDIV::DIV_1)
26//!     .FWDTEN(FWDTEN::OFF)
27//!     .JTAGEN(JTAGEN::OFF)
28//!     .ICESEL(ICESEL::ICS_PGx1)
29//!     .build();
30//! ```
31//!
32#![no_std]
33
34/// Configuration sector struct and builder for PIC32MX1xx
35pub mod pic32mx1xx;
36
37/// Configuration sector struct and builder for PIC32MX2xx
38pub mod pic32mx2xx;
39
40/// Configuration sector struct and builder for PIC32MX1x4 (XLP)
41pub mod pic32mx1x4;
42
43/// Configuration sector struct and builder for PIC32MX2x4 (XLP)
44pub mod pic32mx2x4;
45
46/// Configuration sector struct and builder for PIC32MX330/350/370
47pub mod pic32mx37x;
48
49/// Configuration sector struct and builder for PIC32MX430/450/470
50pub mod pic32mx47x;
51
52/// Configuration sector struct and builder for PIC32MX5xx/6xx/7xx
53pub mod pic32mx567;
54
55/// Configuration sector struct and builder for PIC32MZEF
56pub mod pic32mzef;