Просмотр исходного кода

lsm6ds3tr-c_reg.h: Extend stmdev_ctx_t structure with mdelay callback

The stmdev_ctx_t structure has been extended with a mdelay()
callback, so that STdC drivers may use a platform specific method
to add wait a particular amount of time if needed by a procedure.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
Armando Visconti 3 лет назад
Родитель
Сommit
99b29b4b0e
1 измененных файлов с 3 добавлено и 0 удалено
  1. 3 0
      lsm6ds3tr-c_reg.h

+ 3 - 0
lsm6ds3tr-c_reg.h

@@ -111,12 +111,15 @@ typedef struct
 
 
 typedef int32_t (*stmdev_write_ptr)(void *, uint8_t, const uint8_t *, uint16_t);
 typedef int32_t (*stmdev_write_ptr)(void *, uint8_t, const uint8_t *, uint16_t);
 typedef int32_t (*stmdev_read_ptr)(void *, uint8_t, uint8_t *, uint16_t);
 typedef int32_t (*stmdev_read_ptr)(void *, uint8_t, uint8_t *, uint16_t);
+typedef void (*stmdev_mdelay_ptr)(uint32_t millisec);
 
 
 typedef struct
 typedef struct
 {
 {
   /** Component mandatory fields **/
   /** Component mandatory fields **/
   stmdev_write_ptr  write_reg;
   stmdev_write_ptr  write_reg;
   stmdev_read_ptr   read_reg;
   stmdev_read_ptr   read_reg;
+  /** Component optional fields **/
+  stmdev_mdelay_ptr   mdelay;
   /** Customizable optional pointer **/
   /** Customizable optional pointer **/
   void *handle;
   void *handle;
 } stmdev_ctx_t;
 } stmdev_ctx_t;