I2C_M_SETUP_Type transfer_data; uint8_t rx_data; uint8_t tx_data; //Registerstatus auslesen tx_data = HMC5883_ID_A; //defined as 0x0A transfer_data.sl_addr7bit = HMC5883_ADDRESS; //#define as 0x1E transfer_data.tx_data = &tx_data; transfer_data.tx_length = 1; transfer_data.rx_length = 1; transfer_data.rx_data = &rx_data; transfer_data.retransmissions_max = 3; uint8_t status = I2C_MasterTransferData(i2c_bus, &transfer_data, I2C_TRANSFER_POLLING); |