Szymon Dziok | 0eae33c | 2014-03-27 23:31:04 +0000 | [diff] [blame] | 1 | /*************************************************************************** |
| 2 | * __________ __ ___. |
| 3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ |
| 4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / |
| 5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < |
| 6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ |
| 7 | * \/ \/ \/ \/ \/ |
| 8 | * $Id$ |
| 9 | * |
| 10 | * Copyright (C) 2014 by Szymon Dziok |
| 11 | * |
| 12 | * This program is free software; you can redistribute it and/or |
| 13 | * modify it under the terms of the GNU General Public License |
| 14 | * as published by the Free Software Foundation; either version 2 |
| 15 | * of the License, or (at your option) any later version. |
| 16 | * |
| 17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY |
| 18 | * KIND, either express or implied. |
| 19 | * |
| 20 | ****************************************************************************/ |
| 21 | |
| 22 | /* |
| 23 | SANSA VIEW: TESTING CODE |
| 24 | */ |
| 25 | |
| 26 | |
| 27 | #include <stdlib.h> |
| 28 | #include <stdio.h> |
| 29 | #include <stdarg.h> |
| 30 | #include <string.h> |
| 31 | #include "config.h" |
| 32 | #include "inttypes.h" |
| 33 | #include "cpu.h" |
| 34 | #include "system.h" |
| 35 | #include "lcd.h" |
Michael Sevakis | 4ea4cdf | 2014-08-08 02:28:11 -0400 | [diff] [blame] | 36 | #include "../kernel-internal.h" |
Szymon Dziok | 0eae33c | 2014-03-27 23:31:04 +0000 | [diff] [blame] | 37 | #include "storage.h" |
Szymon Dziok | 0eae33c | 2014-03-27 23:31:04 +0000 | [diff] [blame] | 38 | #include "disk.h" |
| 39 | #include "font.h" |
| 40 | #include "backlight.h" |
| 41 | #include "backlight-target.h" |
| 42 | #include "button.h" |
| 43 | #include "panic.h" |
| 44 | #include "power.h" |
| 45 | #include "file.h" |
| 46 | #include "common.h" |
| 47 | |
| 48 | void main(void) |
| 49 | { |
| 50 | system_init(); |
| 51 | kernel_init(); |
| 52 | disable_irq(); |
| 53 | |
| 54 | while(1) |
| 55 | { |
Marcin Bukat | 89ba7e8 | 2015-01-09 00:22:40 +0100 | [diff] [blame] | 56 | backlight_hw_on(); |
| 57 | buttonlight_hw_off(); |
Szymon Dziok | 0eae33c | 2014-03-27 23:31:04 +0000 | [diff] [blame] | 58 | sleep(HZ/4); |
Marcin Bukat | 89ba7e8 | 2015-01-09 00:22:40 +0100 | [diff] [blame] | 59 | backlight_hw_off(); |
| 60 | buttonlight_hw_on(); |
Szymon Dziok | 0eae33c | 2014-03-27 23:31:04 +0000 | [diff] [blame] | 61 | sleep(HZ/4); |
| 62 | } |
| 63 | } |