summaryrefslogtreecommitdiff
path: root/firmware/API
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-05-06 07:59:27 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-05-06 07:59:27 +0000
commit2370cd4d67bf77fa817499f445d380073a4983d0 (patch)
tree82cc1cea24cec81fb0a3b49b0462ad05aa16188f /firmware/API
parente630d64027829465a079e22465a8be74edd07e99 (diff)
downloadrockbox-2370cd4d67bf77fa817499f445d380073a4983d0.zip
rockbox-2370cd4d67bf77fa817499f445d380073a4983d0.tar.gz
rockbox-2370cd4d67bf77fa817499f445d380073a4983d0.tar.bz2
rockbox-2370cd4d67bf77fa817499f445d380073a4983d0.tar.xz
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/API102
1 files changed, 102 insertions, 0 deletions
diff --git a/firmware/API b/firmware/API
new file mode 100644
index 0000000..fdc3c29
--- /dev/null
+++ b/firmware/API
@@ -0,0 +1,102 @@
+$Id$
+ __________ __ ___.
+ Open \______ \ ____ ____ | | _\_ |__ _______ ___
+ Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
+ Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
+ Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
+ \/ \/ \/ \/ \/
+
+ API summmary
+
+[ This is still pretty rough and basic. Extend! ]
+
+LCD
+
+ #include <lcd.h>
+
+ Generic
+
+ Most LCD functions are specific for which output we work with, due to the
+ huge differences.
+
+ lcd_init() - init the LCD stuff
+ lcd_clear_display() - clear the whole display
+ lcd_backlight(on) - set backlight on/off
+
+ Recorder
+
+ All the functions operate on a display buffer. You make the buffer get
+ shown on screen by calling lcd_update().
+
+ lcd_update() update the LCD according to the internal buffer.
+ lcd_puts(x,y,string,font) put a string at given position
+ lcd_bitmap(src,x,y,width,height,clear) put a bitmap at given position
+ lcd_clearrect(x,y,width,height) clear a rectangle area
+ lcd_fillrect(x,y,width,height) fill a rectangle area
+ lcd_drawrect(x,y,width,height) draw a rectangle
+ lcd_invertrect(x,y,width,height) revert the graphics of the given area
+ lcd_drawline(x1,y1,x2,y2) draw a line between the coordinates
+ lcd_drawpixel(x,y) put a pixel on the given coordinate
+ lcd_clearpixel(x,y) clear the pixel at the given coordinate
+ lcd_fontsize(font,width,height) return the width and height of the font
+
+ Player
+
+ lcd_puts(x,y,string) write a string at given position
+ lcd_define_pattern(which,pattern,lenth) define a custom pattern
+
+Buttons
+
+ #include <button.h>
+
+ These functions work the same unregarding of which keypad you have, but they
+ return a different set of values. Note that the Recorder keypad have 10
+ keys, while the Player keypad only features 6.
+
+ button_init() init button functions
+ button_get() returns a bitmask for which keys that were pressed
+
+Files
+
+ #include <file.h>
+
+ open()
+ read()
+ lseek()
+ write()
+ close()
+ rename()
+ remove()
+
+Directories
+
+ #include <dir.h>
+
+ opendir()
+ readdir()
+ closedir()
+
+String/Memory
+
+ #include <string.h>
+
+ strcmp()
+ strcpy()
+ memcpy()
+ memset()
+ ...
+
+ID3
+
+ #include <id3.h>
+ bool mp3info(mp3entry *entry, char *filename);
+
+ Return FALSE if successful. The given mp3entry is then filled in with
+ whatever id3 info it could find about the given file.
+
+Various
+
+ #include <kernel.h>
+
+ sleep(ticks) - sleep a specified number of ticks, we currently have HZ ticks
+ per second