Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: TD1_exo1 TD1_exe1_suite TP3_exo1 TP3_exo2 ... more
Revision 13:b0c643bbf1fa, committed 2018-05-02
- Comitter:
- YSI
- Date:
- Wed May 02 15:03:36 2018 +0000
- Parent:
- 12:65ab16b1561b
- Commit message:
- update interrupt bug
Changed in this revision
| lib_LCD_i2c_SPTLYI.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/lib_LCD_i2c_SPTLYI.cpp Wed May 02 14:50:11 2018 +0000
+++ b/lib_LCD_i2c_SPTLYI.cpp Wed May 02 15:03:36 2018 +0000
@@ -69,9 +69,9 @@
I2C::frequency(I2C_Frequency);
char data[12]={First_Controle_Byte,Function_Set_IS0,Last_Controle_Byte,Function_Set_IS1,Shift_Right_Cursor_Set,Contrast_Set,Power_Icon_Set,Follower_Controle_Set,Display_ON_Set,Clear_Display,Return_Home,Entry_Mode_Set};
- Interrupts_OFF;
+ // Interrupts_OFF; // Interdit depuis 2018 si I2C utilise en interrupt
int ack = I2C::write(m_address, data, 12);
- Interrupts_ON;
+ // Interrupts_ON;
wait_ms(1);
return ack;
}
@@ -90,9 +90,9 @@
int LCD_I2C::clear(void)
{
char data[2]={Last_Controle_Byte,Clear_Display};
- Interrupts_OFF;
+ // Interrupts_OFF; // Interdit depuis 2018 si I2C utilise en interrupt
int ack = I2C::write(m_address, data, 2);
- Interrupts_ON;
+ // Interrupts_ON;
X40_position_cursor = 0;
X80_position_cursor = 0;
Y2_position_cursor = 0;
@@ -103,45 +103,45 @@
int LCD_I2C::turn_on_cursor(void)
{
char data[2]={Last_Controle_Byte,Cursor_ON_Set};
- Interrupts_OFF;
+ // Interrupts_OFF; // Interdit depuis 2018 si I2C utilise en interrupt
int ack = I2C::write(m_address, data, 2);
- Interrupts_ON;
+ // Interrupts_ON;
return ack;
}
int LCD_I2C::turn_off_cursor(void)
{
char data[2]={Last_Controle_Byte,Cursor_OFF_Set};
- Interrupts_OFF;
+ // Interrupts_OFF; // Interdit depuis 2018 si I2C utilise en interrupt
int ack = I2C::write(m_address, data, 2);
- Interrupts_ON;
+ // Interrupts_ON;
return ack;
}
int LCD_I2C::turn_on_display(void)
{
char data[2]={Last_Controle_Byte,Display_ON_Set};
- Interrupts_OFF;
+ // Interrupts_OFF; // Interdit depuis 2018 si I2C utilise en interrupt
int ack = I2C::write(m_address, data, 2);
- Interrupts_ON;
+ // Interrupts_ON;
return ack;
}
int LCD_I2C::turn_off_display(void)
{
char data[2]={Last_Controle_Byte,Display_OFF_Set};
- Interrupts_OFF;
+ // Interrupts_OFF; // Interdit depuis 2018 si I2C utilise en interrupt
int ack = I2C::write(m_address, data, 2);
- Interrupts_ON;
+ // Interrupts_ON;
return ack;
}
int LCD_I2C::return_home_cursor(void)
{
char data[2]={Last_Controle_Byte,Return_Home};
- Interrupts_OFF;
+ // Interrupts_OFF; // Interdit depuis 2018 si I2C utilise en interrupt
int ack = I2C::write(m_address, data, 2);
- Interrupts_ON;
+ // Interrupts_ON;
X40_position_cursor = 0;
X80_position_cursor = 0;
Y2_position_cursor = 0;
@@ -154,9 +154,9 @@
int i=0;
for(i=0;i<n;i++)
{
- Interrupts_OFF;
+ // Interrupts_OFF; // Interdit depuis 2018 si I2C utilise en interrupt
I2C::write(m_address, data, 3);
- Interrupts_ON;
+ // Interrupts_ON;
}
X_move_position(-n);
}
@@ -167,9 +167,9 @@
int i=0;
for(i=0;i<n;i++)
{
- Interrupts_OFF;
+ // Interrupts_OFF; // Interdit depuis 2018 si I2C utilise en interrupt
I2C::write(m_address, data, 3);
- Interrupts_ON;
+ // Interrupts_ON;
}
X_move_position(n);
}
@@ -177,9 +177,9 @@
int LCD_I2C::shift_line_cursor(void)
{
char data[4]={Last_Controle_Byte,Function_Set_IS0,0x40+0x00,0x80+0x40};
- Interrupts_OFF;
+ // Interrupts_OFF; // Interdit depuis 2018 si I2C utilise en interrupt
int ack = I2C::write(m_address, data, 4);
- Interrupts_ON;
+ // Interrupts_ON;
X40_position_cursor = 0;
X80_position_cursor = 0;
Y2_position_cursor = 1;
@@ -211,9 +211,9 @@
DDRAM += 0x80;
char data[4]={Last_Controle_Byte,Function_Set_IS0,CGRAM,DDRAM};
- Interrupts_OFF;
+ // Interrupts_OFF; // Interdit depuis 2018 si I2C utilise en interrupt
int ack = I2C::write(m_address, data, 4);
- Interrupts_ON;
+ // Interrupts_ON;
return ack;
}
@@ -245,9 +245,9 @@
DDRAM += 0x80;
char data[4]={Last_Controle_Byte,Function_Set_IS0,CGRAM,DDRAM};
- Interrupts_OFF;
+ // Interrupts_OFF; // Interdit depuis 2018 si I2C utilise en interrupt
int ack = I2C::write(m_address, data, 4);
- Interrupts_ON;
+ // Interrupts_ON;
return ack;
}
@@ -257,9 +257,9 @@
int i=0;
for(i=0;i<n;i++)
{
- Interrupts_OFF;
+ // Interrupts_OFF; // Interdit depuis 2018 si I2C utilise en interrupt
I2C::write(m_address, data, 3);
- Interrupts_ON;
+ // Interrupts_ON;
}
}
@@ -269,54 +269,54 @@
int i=0;
for(i=0;i<n;i++)
{
- Interrupts_OFF;
+ // Interrupts_OFF; // Interdit depuis 2018 si I2C utilise en interrupt
I2C::write(m_address, data, 3);
- Interrupts_ON;
+ // Interrupts_ON;
}
}
int LCD_I2C::enable_auto_shift_right_display(void)
{
char data[2]={Last_Controle_Byte,0x05};
- Interrupts_OFF;
+ // Interrupts_OFF; // Interdit depuis 2018 si I2C utilise en interrupt
int ack = I2C::write(m_address, data, 2);
- Interrupts_ON;
+ // Interrupts_ON;
return ack;
}
int LCD_I2C::enable_auto_shift_left_display(void)
{
char data[2]={Last_Controle_Byte,0x07};
- Interrupts_OFF;
+ // Interrupts_OFF; // Interdit depuis 2018 si I2C utilise en interrupt
int ack = I2C::write(m_address, data, 2);
- Interrupts_ON;
+ // Interrupts_ON;
return ack;
}
int LCD_I2C::disable_auto_shift_display(void)
{
char data[2]={Last_Controle_Byte,0x06};
- Interrupts_OFF;
+ // Interrupts_OFF; // Interdit depuis 2018 si I2C utilise en interrupt
int ack = I2C::write(m_address, data, 2);
- Interrupts_ON;
+ // Interrupts_ON;
return ack;
}
int LCD_I2C::auto_shift_right_cursor(void)
{
char data[2]={Last_Controle_Byte,0x06};
- Interrupts_OFF;
+ // Interrupts_OFF; // Interdit depuis 2018 si I2C utilise en interrupt
int ack = I2C::write(m_address, data, 2);
- Interrupts_ON;
+ // Interrupts_ON;
return ack;
}
int LCD_I2C::auto_shift_left_cursor(void)
{
char data[2]={Last_Controle_Byte,0x04};
- Interrupts_OFF;
+ // Interrupts_OFF; // Interdit depuis 2018 si I2C utilise en interrupt
int ack = I2C::write(m_address, data, 2);
- Interrupts_ON;
+ // Interrupts_ON;
return ack;
}
@@ -357,9 +357,9 @@
int LCD_I2C::print(char c)
{
char data[2]={Register_Select_CByte,c};
- Interrupts_OFF;
+ // Interrupts_OFF; // Interdit depuis 2018 si I2C utilise en interrupt
int ack = I2C::write(m_address, data, 2);
- Interrupts_ON;
+ // Interrupts_ON;
LCD_Data_Register[X80_position_cursor] = c;
X_move_position(1);
return ack;