otm8009a_reg.c
Go to the documentation of this file.
1 
21 /* Includes ------------------------------------------------------------------*/
22 #include "otm8009a_reg.h"
23 
36 /* Private types -------------------------------------------------------------*/
37 /* Private variables ---------------------------------------------------------*/
38 /* Private constants ---------------------------------------------------------*/
47 /* Private macros ------------------------------------------------------------*/
48 /* Private functions ---------------------------------------------------------*/
49 
50 /************** Generic Function *******************/
51 /*******************************************************************************
52 * Function Name : otm8009a_read_reg
53 * Description : Generic Reading function. It must be fullfilled with either
54 * I2C or SPI reading functions
55 * Input : Register Address, length of buffer
56 * Output : Data Read
57 *******************************************************************************/
58 int32_t otm8009a_read_reg(otm8009a_ctx_t *ctx, uint16_t reg, uint8_t *pdata, uint16_t length)
59 {
60  return ctx->ReadReg(ctx->handle, reg, pdata, length);
61 }
62 
63 /*******************************************************************************
64 * Function Name : otm8009a_write_reg
65 * Description : Generic Writing function. It must be fullfilled with either
66 * I2C or SPI writing function
67 * Input : Register Address, Data to be written, length of buffer
68 * Output : None
69 *******************************************************************************/
70 int32_t otm8009a_write_reg(otm8009a_ctx_t *ctx, uint16_t reg, const uint8_t *pdata, uint16_t length)
71 {
72  return ctx->WriteReg(ctx->handle, reg, (uint8_t *)pdata, length);
73 }
74 
87 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
otm8009a_write_reg
int32_t otm8009a_write_reg(otm8009a_ctx_t *ctx, uint16_t reg, const uint8_t *pdata, uint16_t length)
Definition: otm8009a_reg.c:70
otm8009a_ctx_t::handle
void * handle
Definition: otm8009a_reg.h:137
otm8009a_ctx_t
Definition: otm8009a_reg.h:133
otm8009a_ctx_t::WriteReg
OTM8009A_Write_Func WriteReg
Definition: otm8009a_reg.h:135
otm8009a_reg.h
This file contains all the constants parameters for the OTM8009A.
otm8009a_ctx_t::ReadReg
OTM8009A_Read_Func ReadReg
Definition: otm8009a_reg.h:136
otm8009a_read_reg
int32_t otm8009a_read_reg(otm8009a_ctx_t *ctx, uint16_t reg, uint8_t *pdata, uint16_t length)
Definition: otm8009a_reg.c:58


picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:14:50