small changes
This commit is contained in:
parent
099cfc9795
commit
aab6172a36
3 changed files with 5 additions and 59 deletions
|
@ -120,14 +120,6 @@ void Arduinolib__lcd_char_step(uint8_t char_data, Arduinolib__lcd_char_out *out)
|
|||
Arduinolib__lcd_write_step(char_data << 4, o2); // lower 4 bits
|
||||
}
|
||||
|
||||
|
||||
/*const char* Arduinolib__int_to_string_step(uint8_t number, Arduinolib__int_to_string_out *out){
|
||||
char *lstring = "mrgi";
|
||||
//itoa(number, lstring, 10);
|
||||
return lstring;
|
||||
}*/
|
||||
|
||||
|
||||
/* give a string to display to the LCD*/
|
||||
void Arduinolib__lcd_string_step(uint8_t lstring[], int line, Arduinolib__lcd_string_out *out){
|
||||
Arduinolib__lcd_cmd_out *o1;
|
||||
|
@ -146,6 +138,8 @@ void Arduinolib__lcd_string_step(uint8_t lstring[], int line, Arduinolib__lcd_st
|
|||
_delay_us(80); //more than 39us
|
||||
}
|
||||
}
|
||||
|
||||
/* gice a number to display to the LCD */
|
||||
void Arduinolib__lcd_int_step(uint8_t numb, int line, Arduinolib__lcd_int_out *out){
|
||||
char lstring[80];
|
||||
itoa(numb, lstring, 10);
|
||||
|
@ -153,37 +147,3 @@ void Arduinolib__lcd_int_step(uint8_t numb, int line, Arduinolib__lcd_int_out *o
|
|||
Arduinolib__lcd_string_step(lstring, line, o);
|
||||
}
|
||||
|
||||
/*void Arduinolib__lcd_string_step(uint8_t lstring[], Arduinolib__lcd_string_out *out){
|
||||
volatile int i = 0;
|
||||
for (i = 0; lstring[i] != 0 ; i++) {
|
||||
Arduinolib__lcd_char_out *o3;
|
||||
Arduinolib__lcd_char_step(lstring[i], o3);
|
||||
_delay_us(80); //more than 39us
|
||||
}
|
||||
}*/
|
||||
|
||||
/*void Arduinolib__print_string_step(uint8_t lstring[], int line, Arduinolib__print_string_out *out){
|
||||
Arduinolib__lcd_cmd_out *o1;
|
||||
Arduinolib__lcd_cmd_out *o2;
|
||||
if (line == 1) {
|
||||
Arduinolib__lcd_cmd_step(LCD_CURSOR_SET | LCD_START_LINE2, o1);
|
||||
_delay_us(80); //more than
|
||||
} else {
|
||||
Arduinolib__lcd_cmd_step(LCD_CURSOR_SET | LCD_START_LINE1, o2);
|
||||
_delay_us(80);
|
||||
}
|
||||
volatile int i = 0;
|
||||
for (i = 0; lstring[i] != 0 ; i++) {
|
||||
Arduinolib__lcd_char_out *o3;
|
||||
Arduinolib__lcd_char_step(lstring[i], o3);
|
||||
_delay_us(80); //more than 39us
|
||||
}
|
||||
}
|
||||
|
||||
void Arduinolib__print_int_step(uint8_t number, int line, Arduinolib__print_int_out *out){
|
||||
char lstring[80]; //buffer
|
||||
itoa(number, lstring, 10); //convert int to str
|
||||
|
||||
Arduinolib__lcd_string_out *o;
|
||||
Arduinolib__lcd_string_step(lstring, o);
|
||||
}*/
|
||||
|
|
|
@ -23,16 +23,9 @@ typedef struct Arduinolib__lcd_cmd {
|
|||
typedef struct Arduinolib__lcd_char {
|
||||
} Arduinolib__lcd_char_out;
|
||||
|
||||
typedef struct Arduinolib__int_to_string {
|
||||
const char* snumb;
|
||||
} Arduinolib__int_to_string_out;
|
||||
|
||||
typedef struct Arduinolib__lcd_string {
|
||||
} Arduinolib__lcd_string_out;
|
||||
|
||||
typedef struct Arduinolib__print_string {
|
||||
} Arduinolib__print_string_out;
|
||||
|
||||
typedef struct Arduinolib__lcd_int {
|
||||
} Arduinolib__lcd_int_out;
|
||||
|
||||
|
@ -44,13 +37,8 @@ void Arduinolib__lcd_cmd_step(uint8_t cmd, Arduinolib__lcd_cmd_out *o);
|
|||
|
||||
void Arduinolib__lcd_char_step(uint8_t char_data, Arduinolib__lcd_char_out *o);
|
||||
|
||||
/*const char* Arduinolib__int_to_string_step(uint8_t number, Arduinolib__int_to_string_out *o);*/
|
||||
|
||||
void Arduinolib__lcd_string_step(uint8_t lstring[], int line, Arduinolib__lcd_string_out *o);
|
||||
|
||||
void Arduinolib__lcd_int_step(uint8_t numb, int line, Arduinolib__lcd_int_out *o);
|
||||
|
||||
/*void Arduinolib__print_string_step(uint8_t lstring[], int line, Arduinolib__print_string_out *o);*/
|
||||
|
||||
/*void Arduinolib__print_int_step(uint8_t numb, int line, Arduinolib__print_int_out *o);*/
|
||||
|
||||
#endif
|
|
@ -24,11 +24,9 @@ let
|
|||
tel
|
||||
|
||||
node main() returns ()
|
||||
var j : int;
|
||||
start : bool;
|
||||
var start : bool;
|
||||
let
|
||||
j = 0 fby (j+1);
|
||||
start = j < 1;
|
||||
start = true fby false;
|
||||
() = lcd_init() when start;
|
||||
|
||||
() = lcd_blink_msg ((2, 1, "hello world!", 0) when not start);
|
||||
|
|
Loading…
Reference in a new issue