text: /**
    ******************************************************************************
    * @file    otm8009a_reg.c
    * @author  MCD Application Team
    * @brief   This file provides generic register APIs to read/write the OTM8009A
    *          controller's registers
    ******************************************************************************
    * @attention
    *
    * Copyright (c) 2019 STMicroelectronics.
    * All rights reserved.
    * This software is licensed under terms that can be found in the LICENSE file in
    * the root directory of this software component.
    * If no LICENSE file comes with this software, it is provided AS-IS.
    *
    ******************************************************************************
    */
  
  /* Includes ------------------------------------------------------------------*/
  #include "otm8009a_reg.h"
  
  /** @addtogroup BSP
    * @{
    */
    
  /** @addtogroup Components
    * @{
    */ 
  
  /** @addtogroup OTM8009A
    * @{
    */
      
  /* Private types -------------------------------------------------------------*/
  /* Private variables ---------------------------------------------------------*/
  /* Private constants ---------------------------------------------------------*/
  /** @defgroup OTM8009A_Private_Constants OTM8009A Private Constants
    * @{
    */
  
  /**
    * @}
    */
  
  /* Private macros ------------------------------------------------------------*/
  /* Private functions ---------------------------------------------------------*/
  
  /************** Generic Function  *******************/
  /*******************************************************************************
  * Function Name : otm8009a_read_reg
  * Description   : Generic Reading function. It must be fullfilled with either
  *                 I2C or SPI reading functions
  * Input         : Register Address, length of buffer
  * Output        : Data Read
  *******************************************************************************/
  int32_t otm8009a_read_reg(otm8009a_ctx_t *ctx, uint16_t reg, uint8_t *pdata, uint16_t length)
  {
    return ctx->ReadReg(ctx->handle, reg, pdata, length);
  }
  
  /*******************************************************************************
  * Function Name : otm8009a_write_reg
  * Description   : Generic Writing function. It must be fullfilled with either
  *                 I2C or SPI writing function
  * Input         : Register Address, Data to be written, length of buffer
  * Output        : None
  *******************************************************************************/
  int32_t otm8009a_write_reg(otm8009a_ctx_t *ctx, uint16_t reg, const uint8_t *pdata, uint16_t length)
  {
    return ctx->WriteReg(ctx->handle, reg, (uint8_t *)pdata, length);
  }
  
  /**
    * @}
    */
  
  /**
    * @}
    */
  
  /**
    * @}
    */
  
  /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
  