@@ -13,10 +13,13 @@ use kernel::{
1313 types:: ForeignOwnable , ThisModule ,
1414} ;
1515
16+ /// TODO: add documentation
1617pub trait MessageProcessor {
18+ /// TODO: add documentation
1719 fn process ( & self , message : & [ u8 ] ) -> u32 ;
1820}
1921
22+ /// TODO: add documentation
2023pub struct AopSensorData < T : MessageProcessor > {
2124 dev : platform:: Device ,
2225 ty : u32 ,
@@ -25,6 +28,7 @@ pub struct AopSensorData<T: MessageProcessor> {
2528}
2629
2730impl < T : MessageProcessor > AopSensorData < T > {
31+ /// TODO: add documentation
2832 pub fn new ( dev : platform:: Device , ty : u32 , msg_proc : T ) -> Result < Arc < AopSensorData < T > > > {
2933 Ok ( Arc :: new (
3034 AopSensorData {
@@ -76,6 +80,7 @@ struct IIOSpec {
7680 _p : PhantomPinned ,
7781}
7882
83+ /// TODO: add documentation
7984pub struct IIORegistration < T : MessageProcessor + ' static > {
8085 dev : * mut bindings:: iio_dev ,
8186 spec : Pin < KBox < IIOSpec > > ,
@@ -84,6 +89,7 @@ pub struct IIORegistration<T: MessageProcessor + 'static> {
8489}
8590
8691impl < T : MessageProcessor + ' static > IIORegistration < T > {
92+ /// TODO: add documentation
8793 pub fn new (
8894 data : Arc < AopSensorData < T > > ,
8995 name : & ' static CStr ,
0 commit comments