@@ -25,26 +25,53 @@ pub struct Cpu {
25
25
26
26
/// Indicate whether the processor is equipped with a double precision floating point unit.
27
27
/// This element is valid only when `fpu_present` is set to `true`
28
- #[ cfg_attr( feature = "serde" , serde( rename = "fpuDP" ) ) ]
28
+ #[ cfg_attr(
29
+ feature = "serde" ,
30
+ serde( default , skip_serializing_if = "Option::is_none" , rename = "fpuDP" )
31
+ ) ]
29
32
pub fpu_double_precision : Option < bool > ,
30
33
31
34
/// Indicates whether the processor implements the optional SIMD DSP extensions (DSP)
35
+ #[ cfg_attr(
36
+ feature = "serde" ,
37
+ serde( default , skip_serializing_if = "Option::is_none" )
38
+ ) ]
32
39
pub dsp_present : Option < bool > ,
33
40
34
41
/// Indicate whether the processor has an instruction cache
42
+ #[ cfg_attr(
43
+ feature = "serde" ,
44
+ serde( default , skip_serializing_if = "Option::is_none" )
45
+ ) ]
35
46
pub icache_present : Option < bool > ,
36
47
37
48
/// Indicate whether the processor has a data cache
49
+ #[ cfg_attr(
50
+ feature = "serde" ,
51
+ serde( default , skip_serializing_if = "Option::is_none" )
52
+ ) ]
38
53
pub dcache_present : Option < bool > ,
39
54
40
55
/// Indicate whether the processor has an instruction tightly coupled memory
56
+ #[ cfg_attr(
57
+ feature = "serde" ,
58
+ serde( default , skip_serializing_if = "Option::is_none" )
59
+ ) ]
41
60
pub itcm_present : Option < bool > ,
42
61
43
62
/// Indicate whether the processor has a data tightly coupled memory
63
+ #[ cfg_attr(
64
+ feature = "serde" ,
65
+ serde( default , skip_serializing_if = "Option::is_none" )
66
+ ) ]
44
67
pub dtcm_present : Option < bool > ,
45
68
46
69
/// Indicate whether the Vector Table Offset Register (VTOR) is implemented.
47
70
/// If not specified, then VTOR is assumed to be present
71
+ #[ cfg_attr(
72
+ feature = "serde" ,
73
+ serde( default , skip_serializing_if = "Option::is_none" )
74
+ ) ]
48
75
pub vtor_present : Option < bool > ,
49
76
50
77
/// Define the number of bits available in the Nested Vectored Interrupt Controller (NVIC) for configuring priority
@@ -56,9 +83,17 @@ pub struct Cpu {
56
83
pub has_vendor_systick : bool ,
57
84
58
85
/// Add 1 to the highest interrupt number and specify this number in here
86
+ #[ cfg_attr(
87
+ feature = "serde" ,
88
+ serde( default , skip_serializing_if = "Option::is_none" )
89
+ ) ]
59
90
pub device_num_interrupts : Option < u32 > ,
60
91
61
92
/// Indicate the amount of regions in the Security Attribution Unit (SAU)
93
+ #[ cfg_attr(
94
+ feature = "serde" ,
95
+ serde( default , skip_serializing_if = "Option::is_none" )
96
+ ) ]
62
97
pub sau_num_regions : Option < u32 > ,
63
98
// sauRegionsConfig
64
99
}
0 commit comments