This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

adxl345 i2c nrf51422

I tried the Bjørn's code : devzone.nordicsemi.com/.../ I didn't make it... Could you help with a simple code you've tried for adxl345 ? Thank you Yassine

Parents
  • Hi,

    The register addresses is close to identical, so it should not be a big problem to get it to work with ADXL345. Actually the registers that the driver uses have the exact same addresses on both ADXL375 and ADXL345.

  • The version is 12.2

    I have two errors, which i managed, i thought that ..., but it still not working

    1. error: #140: too many arguments in function call ret_code = nrf_drv_twi_rx(p_twi_master,slave_addr, pdata, bytes, false);

    knowing that in nrf_drv_twi.c it's declared like this:

    ret_code_t nrf_drv_twi_rx(nrf_drv_twi_t const * p_instance, uint8_t address, uint8_t * p_data, uint8_t length)

    (I deleted the 'FALSE' ... )

    1. error: #165: too few arguments in function call ret = nrf_drv_twi_init(&m_twi_master, &config, NULL);

    it's declared like this:

    ret_code_t nrf_drv_twi_init(nrf_drv_twi_t const * p_instance, nrf_drv_twi_config_t const * p_config, nrf_drv_twi_evt_handler_t event_handler, void * p_context) So one argument is missing.

Reply
  • The version is 12.2

    I have two errors, which i managed, i thought that ..., but it still not working

    1. error: #140: too many arguments in function call ret_code = nrf_drv_twi_rx(p_twi_master,slave_addr, pdata, bytes, false);

    knowing that in nrf_drv_twi.c it's declared like this:

    ret_code_t nrf_drv_twi_rx(nrf_drv_twi_t const * p_instance, uint8_t address, uint8_t * p_data, uint8_t length)

    (I deleted the 'FALSE' ... )

    1. error: #165: too few arguments in function call ret = nrf_drv_twi_init(&m_twi_master, &config, NULL);

    it's declared like this:

    ret_code_t nrf_drv_twi_init(nrf_drv_twi_t const * p_instance, nrf_drv_twi_config_t const * p_config, nrf_drv_twi_evt_handler_t event_handler, void * p_context) So one argument is missing.

Children
No Data
Related