Revision 2344a771

View differences:

include/P9221R/v1/alld_P9221R_v1.h
72 72
  P9221R_LLD_REGISTER_ALIGNMENT_Y               = 0x4C,
73 73
} p9221r_lld_register_t;
74 74

  
75
/**
76
 * @brief I2C address masks.
77
 */
78
enum {
79
  P9221R_LLD_I2C_ADDR_FIXED   = 0x0061u,
80
};
81 75

  
82 76
typedef struct {
83 77
  apalI2CDriver_t* i2cd;
84 78
  apalI2Caddr_t addr;
85 79
  uint16_t current_lsb_uA;
86
  P9221R_lld_cfg_t *config;
87
} P9221RDriver;
80
  //P9221R_lld_cfg_t *config;
81
}P9221RDriver;
88 82

  
89 83

  
90 84
/******************************************************************************/
source/P9221R/v1/alld_P9221R_v1.c
89 89
 * @return                  An indicator whether the call was successfull
90 90
 */
91 91

  
92
apalExitStatus_t p9221r_lld_write_register(const R9221RDriver* const p9221r, const p9221r_lld_register_t addr, const uint16_t* const data, const uint8_t num, const apalTime_t timeout)
92
apalExitStatus_t p9221r_lld_write_register(const P9221RDriver* const p9221r, const p9221r_lld_register_t addr, const uint16_t* const data, const uint8_t num, const apalTime_t timeout)
93 93
{
94 94
  apalDbgAssert(p9221r != NULL);
95 95
  apalDbgAssert(p9221r->i2cd != NULL);
......
101 101
    buffer[dataIdx*2+1] = data[dataIdx] >> 8;
102 102
    buffer[dataIdx*2+2] = data[dataIdx] & (0x00FFu);
103 103
  }
104
  return apalI2CMasterTransmit(p9221r->i2cd, (R9221R_LLD_I2C_ADDR_FIXED | p9221r->addr), buffer, 1+2*num, NULL, 0, timeout);
104
  return apalI2CMasterTransmit(p9221r->i2cd, (P9221R_LLD_I2C_ADDR_FIXED | p9221r->addr), buffer, 1+2*num, NULL, 0, timeout);
105 105
}
106 106

  
107 107
#endif /* defined(AMIROLLD_CFG_P9221R) && (AMIROLLD_CFG_P9221R == 1) */

Also available in: Unified diff