portTICK_RATE_MS has been renamed
This commit is contained in:
parent
f9b9d6e829
commit
ab61a653db
|
@ -66,8 +66,8 @@ static const uint8_t ACK_CHECK_EN = 1;
|
||||||
#define I2C_MANAGER_0_PULLUPS false
|
#define I2C_MANAGER_0_PULLUPS false
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define I2C_MANAGER_0_TIMEOUT ( CONFIG_I2C_MANAGER_0_TIMEOUT / portTICK_RATE_MS )
|
#define I2C_MANAGER_0_TIMEOUT ( CONFIG_I2C_MANAGER_0_TIMEOUT / portTICK_PERIOD_MS )
|
||||||
#define I2C_MANAGER_0_LOCK_TIMEOUT ( CONFIG_I2C_MANAGER_0_LOCK_TIMEOUT / portTICK_RATE_MS )
|
#define I2C_MANAGER_0_LOCK_TIMEOUT ( CONFIG_I2C_MANAGER_0_LOCK_TIMEOUT / portTICK_PERIOD_MS )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -79,8 +79,8 @@ static const uint8_t ACK_CHECK_EN = 1;
|
||||||
#define I2C_MANAGER_1_PULLUPS false
|
#define I2C_MANAGER_1_PULLUPS false
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define I2C_MANAGER_1_TIMEOUT ( CONFIG_I2C_MANAGER_1_TIMEOUT / portTICK_RATE_MS )
|
#define I2C_MANAGER_1_TIMEOUT ( CONFIG_I2C_MANAGER_1_TIMEOUT / portTICK_PERIOD_MS )
|
||||||
#define I2C_MANAGER_1_LOCK_TIMEOUT ( CONFIG_I2C_MANAGER_1_LOCK_TIMEOUT / portTICK_RATE_MS )
|
#define I2C_MANAGER_1_LOCK_TIMEOUT ( CONFIG_I2C_MANAGER_1_LOCK_TIMEOUT / portTICK_PERIOD_MS )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define ERROR_PORT(port, fail) { \
|
#define ERROR_PORT(port, fail) { \
|
||||||
|
@ -244,12 +244,12 @@ esp_err_t I2C_FN(_write)(i2c_port_t port, uint16_t addr, uint32_t reg, const uin
|
||||||
TickType_t timeout = 0;
|
TickType_t timeout = 0;
|
||||||
#if defined (I2C_ZERO)
|
#if defined (I2C_ZERO)
|
||||||
if (port == I2C_NUM_0) {
|
if (port == I2C_NUM_0) {
|
||||||
timeout = (CONFIG_I2C_MANAGER_0_TIMEOUT) / portTICK_RATE_MS;
|
timeout = (CONFIG_I2C_MANAGER_0_TIMEOUT) / portTICK_PERIOD_MS;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if defined (I2C_ONE)
|
#if defined (I2C_ONE)
|
||||||
if (port == I2C_NUM_1) {
|
if (port == I2C_NUM_1) {
|
||||||
timeout = (CONFIG_I2C_MANAGER_1_TIMEOUT) / portTICK_RATE_MS;
|
timeout = (CONFIG_I2C_MANAGER_1_TIMEOUT) / portTICK_PERIOD_MS;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -294,12 +294,12 @@ esp_err_t I2C_FN(_lock)(i2c_port_t port) {
|
||||||
TickType_t timeout;
|
TickType_t timeout;
|
||||||
#if defined (I2C_ZERO)
|
#if defined (I2C_ZERO)
|
||||||
if (port == I2C_NUM_0) {
|
if (port == I2C_NUM_0) {
|
||||||
timeout = (CONFIG_I2C_MANAGER_0_LOCK_TIMEOUT) / portTICK_RATE_MS;
|
timeout = (CONFIG_I2C_MANAGER_0_LOCK_TIMEOUT) / portTICK_PERIOD_MS;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if defined (I2C_ONE)
|
#if defined (I2C_ONE)
|
||||||
if (port == I2C_NUM_1) {
|
if (port == I2C_NUM_1) {
|
||||||
timeout = (CONFIG_I2C_MANAGER_1_LOCK_TIMEOUT) / portTICK_RATE_MS;
|
timeout = (CONFIG_I2C_MANAGER_1_LOCK_TIMEOUT) / portTICK_PERIOD_MS;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -145,9 +145,9 @@ void ili9163c_init(void)
|
||||||
|
|
||||||
//Reset the display
|
//Reset the display
|
||||||
gpio_set_level(ILI9163C_RST, 0);
|
gpio_set_level(ILI9163C_RST, 0);
|
||||||
vTaskDelay(100 / portTICK_RATE_MS);
|
vTaskDelay(100 / portTICK_PERIOD_MS);
|
||||||
gpio_set_level(ILI9163C_RST, 1);
|
gpio_set_level(ILI9163C_RST, 1);
|
||||||
vTaskDelay(150 / portTICK_RATE_MS);
|
vTaskDelay(150 / portTICK_PERIOD_MS);
|
||||||
|
|
||||||
//Send all the commands
|
//Send all the commands
|
||||||
uint16_t cmd = 0;
|
uint16_t cmd = 0;
|
||||||
|
@ -157,7 +157,7 @@ void ili9163c_init(void)
|
||||||
ili9163c_send_data(ili_init_cmds[cmd].data, ili_init_cmds[cmd].databytes & 0x1F);
|
ili9163c_send_data(ili_init_cmds[cmd].data, ili_init_cmds[cmd].databytes & 0x1F);
|
||||||
if (ili_init_cmds[cmd].databytes & 0x80)
|
if (ili_init_cmds[cmd].databytes & 0x80)
|
||||||
{
|
{
|
||||||
vTaskDelay(150 / portTICK_RATE_MS);
|
vTaskDelay(150 / portTICK_PERIOD_MS);
|
||||||
}
|
}
|
||||||
cmd++;
|
cmd++;
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,9 +64,9 @@ void pcd8544_init(void){
|
||||||
|
|
||||||
// Reset the display
|
// Reset the display
|
||||||
gpio_set_level(PCD8544_RST, 0);
|
gpio_set_level(PCD8544_RST, 0);
|
||||||
vTaskDelay(100 / portTICK_RATE_MS);
|
vTaskDelay(100 / portTICK_PERIOD_MS);
|
||||||
gpio_set_level(PCD8544_RST, 1);
|
gpio_set_level(PCD8544_RST, 1);
|
||||||
vTaskDelay(100 / portTICK_RATE_MS);
|
vTaskDelay(100 / portTICK_PERIOD_MS);
|
||||||
|
|
||||||
pcd8544_send_cmd(0x21); /* activate chip (PD=0), horizontal increment (V=0), enter extended command set (H=1) */
|
pcd8544_send_cmd(0x21); /* activate chip (PD=0), horizontal increment (V=0), enter extended command set (H=1) */
|
||||||
pcd8544_send_cmd(0x06); /* temp. control: b10 = 2 */
|
pcd8544_send_cmd(0x06); /* temp. control: b10 = 2 */
|
||||||
|
|
Loading…
Reference in a new issue