nrf5/modules: Updating readfrom function in machine i2c module to use the new hal function which has been implemented.

This commit is contained in:
Glenn Ruben Bakke 2017-03-04 21:44:05 +01:00
parent 2c61b7f596
commit ee5884bfe9
1 changed files with 4 additions and 1 deletions

View File

@ -131,7 +131,10 @@ mp_obj_t machine_hard_i2c_make_new(const mp_obj_type_t *type, size_t n_args, siz
#include <stdio.h>
int machine_hard_i2c_readfrom(mp_obj_base_t *self_in, uint16_t addr, uint8_t *dest, size_t len, bool stop) {
printf("machine_hard_i2c_readfrom called\n");
machine_hard_i2c_obj_t *self = (machine_hard_i2c_obj_t *)self_in;
hal_twi_master_rx(self->i2c->instance, addr, len, dest, stop);
return 0;
}