Difference between revisions of "Zephyr in tree driver use"

From Wiki at Neela Nurseries
Jump to: navigation, search
(Starting local page for instructions on how to use, leverage a Zephyr in-tree driver.)
(No difference)

Revision as of 04:17, 14 October 2021

This page holding notes on how to use Zephyr in-tree drivers.

Code excerpt:

+
+2021-10-13
+
+In file ./z4-sandbox-kionix-work/modules/hal/st/sensor/stmemsc/iis2dh_STdC/driver/iis2dh_reg.c
+
+ 789 /**
+ 790   * @defgroup  IIS2DH_Common
+ 791   * @brief     This section group common usefull functions
+ 792   * @{
+ 793   *
+ 794   */
+ 795 
+ 796 /**
+ 797   * @brief  DeviceWhoamI .[get]
+ 798   *
+ 799   * @param  ctx      read / write interface definitions
+ 800   * @param  buff     buffer that stores data read
+ 801   * @retval          interface status (MANDATORY: return 0 -> no Error)
+ 802   *
+ 803   */
+ 804 int32_t iis2dh_device_id_get(stmdev_ctx_t *ctx, uint8_t *buff)
+ 805 {
+ 806   int32_t ret;
+ 807   ret = iis2dh_read_reg(ctx, IIS2DH_WHO_AM_I, buff, 1);
+ 808   return ret;
+ 809 }
+ 810 /**
+ 811   * @brief  Self Test.[set]
+ 812   *
+ 813   * @param  ctx      read / write interface definitions
+ 814   * @param  val      change the values of st in reg CTRL_REG4
+ 815   * @retval          interface status (MANDATORY: return 0 -> no Error)
+ 816   *
+ 817   */
+