projects
/
my-code
/
arm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
pause values somehow reasonable for flash and ram usage
[my-code/arm.git]
/
betty
/
betty.c
diff --git
a/betty/betty.c
b/betty/betty.c
index
c2aaa38
..
427d32b
100644
(file)
--- a/
betty/betty.c
+++ b/
betty/betty.c
@@
-46,13
+46,10
@@
int main() {
* start it ...
*/
* start it ...
*/
- /* pause - seems to not work if running from flash! (?) */
- pause(0xffffff);
-
/* display init */
display_bl_toggle();
display_init();
/* display init */
display_bl_toggle();
display_init();
- contrast=0x3
2
;
+ contrast=0x3
8
;
/* pasue again */
/* pasue again */
@@
-61,15
+58,14
@@
int main() {
while(1) {
while(1) {
- pause(0x0
f
ffff);
+ pause(0x0
5
ffff);
/* button test! */
if(button_get_event(&button)) {
/* button test! */
if(button_get_event(&button)) {
- //uart0_send_string(announce);
- uart0_send_byte(contrast);
+ uart0_send_string(announce);
switch(button.key[0]) {
case BUTTON_POWER:
switch(button.key[0]) {
case BUTTON_POWER:
- display_lo
ad_logo(0
);
+ display_lo
go((u8 *)default_logo
);
break;
case BUTTON_DOWN:
if(contrast>0x00)
break;
case BUTTON_DOWN:
if(contrast>0x00)
@@
-96,12
+92,18
@@
int main() {
case BUTTON_1:
display_draw_rectangle(20,20,40,40,
DISPLAY_FILL_B,
case BUTTON_1:
display_draw_rectangle(20,20,40,40,
DISPLAY_FILL_B,
- 0);
+ 0
xff
);
break;
case BUTTON_2:
display_draw_rectangle(50,50,40,40,
DISPLAY_FILL_LG,
break;
case BUTTON_2:
display_draw_rectangle(50,50,40,40,
DISPLAY_FILL_LG,
- 0);
+ 0x7f);
+ break;
+ case BUTTON_3:
+ display_draw_font(70,70,
+ (u8 *)default_font+(0x33>>3),
+ DISPLAY_FILL_LG,
+ 0xff);
break;
default:
display_clear_screen();
break;
default:
display_clear_screen();