diff options
author | Daniel Stenberg <daniel@haxx.se> | 2002-05-06 07:59:27 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2002-05-06 07:59:27 +0000 |
commit | 2370cd4d67bf77fa817499f445d380073a4983d0 (patch) | |
tree | 82cc1cea24cec81fb0a3b49b0462ad05aa16188f /firmware/API | |
parent | e630d64027829465a079e22465a8be74edd07e99 (diff) | |
download | rockbox-2370cd4d67bf77fa817499f445d380073a4983d0.tar.gz rockbox-2370cd4d67bf77fa817499f445d380073a4983d0.zip |
first docs! ;-)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@463 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/API')
-rw-r--r-- | firmware/API | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/firmware/API b/firmware/API new file mode 100644 index 0000000000..fdc3c29702 --- /dev/null +++ b/firmware/API | |||
@@ -0,0 +1,102 @@ | |||
1 | $Id$ | ||
2 | __________ __ ___. | ||
3 | Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | \/ \/ \/ \/ \/ | ||
8 | |||
9 | API summmary | ||
10 | |||
11 | [ This is still pretty rough and basic. Extend! ] | ||
12 | |||
13 | LCD | ||
14 | |||
15 | #include <lcd.h> | ||
16 | |||
17 | Generic | ||
18 | |||
19 | Most LCD functions are specific for which output we work with, due to the | ||
20 | huge differences. | ||
21 | |||
22 | lcd_init() - init the LCD stuff | ||
23 | lcd_clear_display() - clear the whole display | ||
24 | lcd_backlight(on) - set backlight on/off | ||
25 | |||
26 | Recorder | ||
27 | |||
28 | All the functions operate on a display buffer. You make the buffer get | ||
29 | shown on screen by calling lcd_update(). | ||
30 | |||
31 | lcd_update() update the LCD according to the internal buffer. | ||
32 | lcd_puts(x,y,string,font) put a string at given position | ||
33 | lcd_bitmap(src,x,y,width,height,clear) put a bitmap at given position | ||
34 | lcd_clearrect(x,y,width,height) clear a rectangle area | ||
35 | lcd_fillrect(x,y,width,height) fill a rectangle area | ||
36 | lcd_drawrect(x,y,width,height) draw a rectangle | ||
37 | lcd_invertrect(x,y,width,height) revert the graphics of the given area | ||
38 | lcd_drawline(x1,y1,x2,y2) draw a line between the coordinates | ||
39 | lcd_drawpixel(x,y) put a pixel on the given coordinate | ||
40 | lcd_clearpixel(x,y) clear the pixel at the given coordinate | ||
41 | lcd_fontsize(font,width,height) return the width and height of the font | ||
42 | |||
43 | Player | ||
44 | |||
45 | lcd_puts(x,y,string) write a string at given position | ||
46 | lcd_define_pattern(which,pattern,lenth) define a custom pattern | ||
47 | |||
48 | Buttons | ||
49 | |||
50 | #include <button.h> | ||
51 | |||
52 | These functions work the same unregarding of which keypad you have, but they | ||
53 | return a different set of values. Note that the Recorder keypad have 10 | ||
54 | keys, while the Player keypad only features 6. | ||
55 | |||
56 | button_init() init button functions | ||
57 | button_get() returns a bitmask for which keys that were pressed | ||
58 | |||
59 | Files | ||
60 | |||
61 | #include <file.h> | ||
62 | |||
63 | open() | ||
64 | read() | ||
65 | lseek() | ||
66 | write() | ||
67 | close() | ||
68 | rename() | ||
69 | remove() | ||
70 | |||
71 | Directories | ||
72 | |||
73 | #include <dir.h> | ||
74 | |||
75 | opendir() | ||
76 | readdir() | ||
77 | closedir() | ||
78 | |||
79 | String/Memory | ||
80 | |||
81 | #include <string.h> | ||
82 | |||
83 | strcmp() | ||
84 | strcpy() | ||
85 | memcpy() | ||
86 | memset() | ||
87 | ... | ||
88 | |||
89 | ID3 | ||
90 | |||
91 | #include <id3.h> | ||
92 | bool mp3info(mp3entry *entry, char *filename); | ||
93 | |||
94 | Return FALSE if successful. The given mp3entry is then filled in with | ||
95 | whatever id3 info it could find about the given file. | ||
96 | |||
97 | Various | ||
98 | |||
99 | #include <kernel.h> | ||
100 | |||
101 | sleep(ticks) - sleep a specified number of ticks, we currently have HZ ticks | ||
102 | per second | ||