@@ -10,14 +10,14 @@ pub const MAX_NINA_PARAM_LENGTH: usize = 255;
1010
1111#[ repr( u8 ) ]
1212#[ derive( Copy , Clone , Debug ) ]
13- pub enum NinaCommand {
13+ pub ( crate ) enum NinaCommand {
1414 GetFwVersion = 0x37u8 ,
1515 SetPassphrase = 0x11u8 ,
1616 GetConnStatus = 0x20u8 ,
1717 Disconnect = 0x30u8 ,
1818}
1919
20- pub trait NinaParam {
20+ pub ( crate ) trait NinaParam {
2121 // Length of parameter in bytes
2222 type LengthAsBytes : IntoIterator < Item = u8 > ;
2323
@@ -33,7 +33,7 @@ pub trait NinaParam {
3333}
3434
3535// Used for Nina protocol commands with no parameters
36- pub struct NinaNoParams {
36+ pub ( crate ) struct NinaNoParams {
3737 _placeholder : u8 ,
3838}
3939
@@ -62,25 +62,25 @@ impl NinaParam for NinaNoParams {
6262}
6363
6464// Used for single byte params
65- pub struct NinaByteParam {
65+ pub ( crate ) struct NinaByteParam {
6666 length : u8 ,
6767 data : Vec < u8 , 1 > ,
6868}
6969
7070// Used for 2-byte params
71- pub struct NinaWordParam {
71+ pub ( crate ) struct NinaWordParam {
7272 length : u8 ,
7373 data : Vec < u8 , 2 > ,
7474}
7575
7676// Used for params that are smaller than 255 bytes
77- pub struct NinaSmallArrayParam {
77+ pub ( crate ) struct NinaSmallArrayParam {
7878 length : u8 ,
7979 data : Vec < u8 , MAX_NINA_PARAM_LENGTH > ,
8080}
8181
8282// Used for params that can be larger than 255 bytes up to MAX_NINA_PARAM_LENGTH
83- pub struct NinaLargeArrayParam {
83+ pub ( crate ) struct NinaLargeArrayParam {
8484 length : u16 ,
8585 data : Vec < u8 , MAX_NINA_PARAM_LENGTH > ,
8686}
@@ -220,7 +220,7 @@ impl NinaParam for NinaLargeArrayParam {
220220 }
221221}
222222
223- pub trait ProtocolInterface {
223+ pub ( crate ) trait ProtocolInterface {
224224 fn init ( & mut self ) ;
225225 fn reset < D : DelayMs < u16 > > ( & mut self , delay : & mut D ) ;
226226 fn get_fw_version ( & mut self ) -> Result < FirmwareVersion , self :: Error > ;
@@ -230,7 +230,7 @@ pub trait ProtocolInterface {
230230}
231231
232232#[ derive( Debug , Default ) ]
233- pub struct NinaProtocolHandler < B , C > {
233+ pub ( crate ) struct NinaProtocolHandler < B , C > {
234234 /// A Spi or I2c instance
235235 pub bus : B ,
236236 /// An EspControlPins instance
0 commit comments