![]() HAL_I2C_Master_Transmit(&I2C_HANDLER, DEVICE_ADDRESS, (uint8_t*) buffer, 2, I2C_TIMEOUT) ![]() Uint8_t u8g_com_hw_i2c_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr)Ĭase U8G_COM_MSG_ADDRESS: /* define cmd (arg_val = 0) or data mode (arg_val = 1) */ Uint8_t u8g_com_hw_i2c_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr) #define DEVICE_ADDRESS 0x78 //device address is written on back side of your displayĮxtern I2C_HandleTypeDef hi2c3 // use your i2c handler Into inc folder place files u8g_arm.h (need to be created manually), and u8g.h (already existed in src folder). But we are cool guys and we need code for cool controllers:) Thus - we delete folders for LPC controllers, and we'll make folder inc. Unpack archive, we'll see folders src and two folders for lpc controllers. First - download latest version of u8glib library here: I've bought it on aliexpress, and selected I2C connected display.
0 Comments
Leave a Reply. |