-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9fadb14
commit 5c4677e
Showing
13 changed files
with
179 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#ifndef APPS_H | ||
#define APPS_H | ||
|
||
#include "helloWorldApp/helloWorldMain.h" | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#include "apps.mains.h" | ||
|
||
struct Apps apps[APPSIZE] = { | ||
{ | ||
.name = "Brightness", | ||
.pointer = helloWorld | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#ifndef APPS_MAINS_H | ||
#define APPS_MAINS_H | ||
|
||
#include "../config.h" | ||
#include "../main.h" | ||
#include "apps.h" | ||
|
||
|
||
typedef void (*functionptr_t)(); | ||
struct Apps{ | ||
char name[16]; | ||
functionptr_t pointer; | ||
}; | ||
|
||
|
||
extern struct Apps apps[APPSIZE]; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#include "helloWorldMain.h" | ||
|
||
void helloWorld (void) { | ||
uint8_t exit=0; | ||
screen_clear(); | ||
screen_normal(); | ||
|
||
render_sentence_xy("Hello World",20,2); | ||
|
||
while(!exit) { | ||
if(PRESSED_INPUT_NEGATIVE){ | ||
exit = 1; | ||
screen_clear(); | ||
_delay_ms(200); | ||
} | ||
|
||
if (PRESSED_INPUT_POSITIVE) { | ||
screen_invert(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#ifndef HELLOWORLDMAIN_H | ||
#define HELLOWORLDMAIN_H | ||
|
||
|
||
#include "../../device_drivers/screen/screen.h" | ||
#include "../../device_drivers/input/input.h" | ||
#include "../../main.h" | ||
extern void helloWorld(void); | ||
|
||
|
||
#endif |
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
|
||
#define F_CPU 11059200UL | ||
|
||
#define APPSIZE 3 | ||
#define APPSIZE 2 | ||
#define true 1 | ||
#define false 0 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#include "at_sleep.h" | ||
|
||
void goto_sleep(void) { | ||
MCUCSR &=~((1<<ISC00)|((1<<ISC01))); | ||
GICR = (1<<INT0); | ||
DDRC |= (1<<PC2); | ||
PORTC|=(1<<PC2); | ||
_delay_ms(500); | ||
PORTC&=~(1<<PC2); | ||
|
||
set_dutycycle(0); | ||
screen_clear(); | ||
set_sleep_mode(SLEEP_MODE_PWR_DOWN); | ||
sleep_enable(); | ||
sleep_cpu(); | ||
sleep_disable(); | ||
_delay_ms(100); | ||
screen_clear(); | ||
set_dutycycle(50); | ||
GICR &= ~(1<<INT0); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#ifndef AT_SLEEP_H | ||
#define AT_SLEEP_H | ||
|
||
#include "../../config.h" | ||
#include<avr/io.h> | ||
#include<avr/interrupt.h> | ||
#include<avr/sleep.h> | ||
#include<util/delay.h> | ||
#include "../../device_drivers/screen/screen.h" | ||
void goto_sleep(void); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
#ifndef UTILS_H | ||
#define UTILS_H | ||
|
||
#include "../config.h" | ||
#include<avr/io.h> | ||
|
||
|
||
void strcut(char* , char* ,uint8_t ,uint8_t); | ||
|
||
#endif |