summaryrefslogtreecommitdiff
path: root/docs/PLUGIN_API
diff options
context:
space:
mode:
Diffstat (limited to 'docs/PLUGIN_API')
-rw-r--r--docs/PLUGIN_API3461
1 files changed, 2549 insertions, 912 deletions
diff --git a/docs/PLUGIN_API b/docs/PLUGIN_API
index a81bfed875..75c82d447b 100644
--- a/docs/PLUGIN_API
+++ b/docs/PLUGIN_API
@@ -1,912 +1,2549 @@
1$Id$ 1# Auto generated documentation by Rockbox plugin API generator v2
2 __________ __ ___. 2# Made by Maurus Cuelenaere
3 Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3# __________ __ ___.
4 Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4# Open \______ \ ____ ____ | | _\_ |__ _______ ___
5 Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
6 Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
7 \/ \/ \/ \/ \/ 7# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
8 8# \/ \/ \/ \/ \/
9 Plugin API summmary 9# $Id$
10 10#
11Plugin API Version 26 11# Generated from http://svn.rockbox.org/viewvc.cgi/trunk/apps/plugin.h
12(backwards compability up to version 25) 12#
13 13# Format:
14Info: To get the latest plugin api specs: 14# \group memory and strings
15look at struct plugin_api in apps/plugin.h 15# \conditions defined(HAVE_BACKLIGHT)
16(and apps/plugins/helloworld.c for an example) 16# \param fmt
17 17# \return
18Plugin Skeleton 18# \description
19=============== 19# \see func1 func2 [S[apps/plugin.c]]
20 20#
21#include "plugin.h" 21# Markup:
22 22# [W[wiki url]]
23static struct plugin_api* rb; 23# [S[svn url]]
24 24# [F[function]]
25//plugin entry point 25# [[url]]
26enum plugin_status plugin_start(struct plugin_api* api, void* parameter) 26# %BR%
27{ 27# =code=
28 TEST_PLUGIN_API(api); 28
29 (void)parameter; 29char *strcasestr (const char* phaystack, const char* pneedle)
30 rb = api; 30 \group strings and memory
31 31 \param phaystack
32 //insert your code here 32 \param pneedle
33 33 \return
34 return PLUGIN_OK; 34 \description
35} 35
36 36bool action_userabort(int timeout)
37to call a function, use the plugin_api structure this way : rb->function() 37 \group action handling
38 38 \param timeout
39Plugin Internals 39 \return
40================ 40 \description
41 41
42 int version; 42const char *rbversion
43 43 \return version of the plugin API
44 Plugin version number. 44 \description
45 45
46 int plugin_test(int api_version, int model, int memsize); 46void ata_sleep(void)
47 47 \group file
48 This function is called by the TEST_PLUGIN_API() macro to test 48 \description Give the disk some rest
49 compability of the plugin with current software. 49
50 Returns PLUGIN_OK if plugin is supported. 50void ata_spin(void)
51 Returns PLUGIN_WRONG_API_VERSION if plugin version isn't compatible. 51 \group file
52 Returns PLUGIN_WRONG_MODEL if the model or memsize is wrong. 52 \description
53 53
54LCD 54void ata_spindown(int seconds)
55=== 55 \group file
56 56 \param seconds
57 Generic 57 \description
58 ------- 58
59 59int atoi(const char *str)
60 Most LCD functions are specific for which output we work with, due to the 60 \group strings and memory
61 huge differences. 61 \param str
62 62 \return
63 void lcd_clear_display(void); 63 \description he atoi() function converts the initial portion of a string pointed to by str to int
64 64
65 Clear the whole display 65struct mp3entry* audio_current_track(void)
66 66 \group playback control
67 void backlight_on(void); 67 \return the mp3entry struct of the currently playing track
68 68 \description
69 Turn the backlight on 69 \see [S[firmware/export/id3.h]]
70 70
71 void backlight_off(void); 71void audio_ff_rewind(long newtime)
72 72 \group playback control
73 Turn the backlight off 73 \param newtime
74 74 \description
75 void splash(int ticks, bool center, char *fmt, ...); 75
76 76void audio_flush_and_reload_tracks(void)
77 Display a formated string in a box durring time ticks. If center is 77 \group playback control
78 FALSE, the display is left justified. If center is TRUE, the display 78 \description
79 is centered horizontaly and verticaly. The string is formated as with 79
80 the printf function. 80int audio_get_file_pos(void)
81 (There are HZ ticks per second) 81 \group playback control
82 82 \return
83 void lcd_puts(int x, int y, const unsigned char *string); 83 \description
84 84
85 Write a string at given character position. 85bool audio_has_changed_track(void)
86 86 \group playback control
87 void lcd_puts_scroll(int x, int y, unsigned char* string); 87 \return
88 88 \description
89 Print a scrolling string at screen coordinates (x,y). The scrolling 89
90 style is STYLE_DEFAULT. 90void audio_next(void)
91 91 \group playback control
92 void lcd_stop_scroll(void); 92 \description
93 93
94 Stop all scrolling lines on the screen. 94struct mp3entry* audio_next_track(void)
95 95 \group playback control
96 void lcd_set_contrast(int val); 96 \return the mp3entry struct of the upcoming track
97 97 \description
98 Set the screen contrast. Argument val should be a value between 98 \see [S[firmware/export/id3.h]]
99 MIN_CONTRAST_SETTING and MAX_CONTRAST_SETTING. 99
100 100void audio_pause(void)
101 Recorder 101 \group playback control
102 -------- 102 \description
103 103
104 All the functions operate on a display buffer. You make the buffer get 104void audio_prev(void)
105 shown on screen by calling lcd_update(). 105 \group playback control
106 106 \description
107 void lcd_update(void); 107
108 108void audio_resume(void)
109 Update the LCD according to the internal buffer. 109 \group playback control
110 110 \description
111 void lcd_update_rect(int x, int y, int width, int height); 111
112 112void audio_set_input_source(int source, unsigned flags)
113 Update the given rectangle to the LCD. Give arguments measured in 113 \group sound
114 pixels. Notice that the smallest vertical resolution in updates that the 114 \conditions (CONFIG_CODEC == SWCODEC) && (INPUT_SRC_CAPS != 0)
115 hardware supports is even 8 pixels. This function will adjust to those. 115 \param source
116 116 \param flags
117 void lcd_setfont(int font); 117 \description
118 118
119 Set default font 119void audio_set_output_source(int monitor)
120 120 \group sound
121 struc font* font_get(int font); 121 \conditions (CONFIG_CODEC == SWCODEC) && (INPUT_SRC_CAPS != 0)
122 122 \param monitor
123 Return a pointer to an incore font structure. If the requested font 123 \description
124 isn't loaded/compiled-in, decrement the font number and try again. 124
125 125void audio_set_recording_gain(int left, int right, int type)
126 void lcd_putsxy(int x, int y, const unsigned char *string); 126 \group sound
127 127 \conditions (CONFIG_CODEC == SWCODEC) && (defined(HAVE_RECORDING))
128 Put a string at given coordinates. 128 \param left
129 129 \param right
130 void lcd_puts_style(int x, int y, const unsigned char *str, int style); 130 \param type
131 131 \description
132 Put a string at given coordinates. Intger style can be STYLE_DEFAULT 132
133 for black text display or STYLE_INVERT for white text display. 133int audio_status(void)
134 134 \group playback control
135 void lcd_puts_scroll_style(int x, int y, unsigned char* string, int style); 135 \return
136 136 \description
137 Same as lcd_puts_style and scrolling is enabled. 137
138 {new in plugin API version 26} 138void audio_stop(void)
139 139 \group playback control
140 void lcd_bitmap(const unsigned char *src, int x, int y, int width, 140 \description
141 int height, bool clear); 141
142 142void backlight_off(void)
143 Put a bitmap at given coordinates. If clear is true, the area is 143 \group backlight
144 cleared before the bitmap is put. 144 \description Turns the backlight off
145 Element src[i] is the binary representation of column number i of 145
146 the bitmap read from bottom to top. 146void backlight_on(void)
147 147 \group backlight
148 void lcd_clearrect(int x, int y, int width, int height); 148 \description Turns the backlight on
149 149
150 Clear a rectangle area. 150void backlight_set_brightness(int val)
151 151 \group backlight
152 void lcd_fillrect(int x, int y, int width, int height); 152 \conditions (defined(HAVE_BACKLIGHT_BRIGHTNESS))
153 153 \param val
154 Fill a rectangle area. 154 \description
155 155
156 void lcd_drawrect(int x, int y, int width, int height); 156void backlight_set_timeout(int index)
157 157 \group backlight
158 Draw a rectangle. 158 \param index 0 : backlight always off%BR%1 : no time out%BR%2 : 1s%BR%3 : 2s%BR%4 : 3s%BR%5 : 4s%BR%6 : 5s%BR%7 : 6s%BR%8 : 7s%BR%9 : 8s%BR%10 : 9s%BR%11 : 10s%BR%12 : 15s%BR%13 : 20s%BR%14 : 25s%BR%15 : 30s%BR%16 : 45s%BR%17 : 60s%BR%18 : 90s%BR%other : backlight always off
159 159 \description Set the backlight timeout
160 void lcd_invertrect(int x, int y, int width, int height); 160
161 161void backlight_set_timeout_plugged(int index)
162 Revert the graphics of the given area. 162 \conditions (CONFIG_CHARGING)
163 163 \param index
164 void lcd_drawline(int x1, int y1, int x2, int y2); 164 \description
165 165
166 Draw a line between the coordinates. 166int battery_level(void)
167 167 \group power
168 void lcd_clearline(int x1, int y1, int x2, int y2); 168 \return battery level in percent
169 169 \description On the simulator, battery_level is always 75
170 Clear a line between two coordinates. 170
171 171bool battery_level_safe(void)
172 void lcd_drawpixel(int x, int y); 172 \group power
173 173 \return
174 Draw a pixel on the given coordinate. 174 \description
175 175
176 void lcd_clearpixel(int x, int y); 176int battery_time(void)
177 177 \group power
178 Clear the pixel at the given coordinate. 178 \return
179 179 \description
180 int lcd_getstringsize(const unsigned char *str, int *w, int *h); 180
181 181unsigned int battery_voltage(void)
182 Get the height and width of string str as it would appear on display. 182 \group power
183 Return value is the width. 183 \conditions (!defined(SIMULATOR))
184 184 \return
185 void scrollbar(int x, int y, int width, int height, int items, 185 \description
186 int min_shown, int max_shown, int orientation); 186
187 187unsigned short *bidi_l2v( const unsigned char *str, int orientation )
188 Print a scroll bar at coordinates (x,y) of size width*height. 188 \conditions !defined(HAVE_LCD_CHARCELLS)
189 orientation can be VERTICAL for a vertical scroll bar or anything else 189 \param str
190 for a horizontal scroll bar. 190 \param orientation
191 Item is the total number of items which the scroll bar refers to, 191 \return
192 min_show the rank of the first item displayed and max_show the 192 \description
193 rank of the last displayed item. 193
194 194void bitswap(unsigned char *data, int length)
195 void checkbox(int x, int y, int width, int height, bool checked); 195 \group sound
196 196 \conditions (!defined(SIMULATOR)) && (CONFIG_CODEC != SWCODEC)
197 Draw a checkbox area. If checked is TRUE, the checkbox is drawn 197 \param data
198 checked ! 198 \param length
199 199 \description Swap the bits for each element of array =data= of size =length=
200 void lcd_blit(unsigned char* p_data, int x, int y, int width, 200
201 int height, int stride); 201int bufadvance(int handle_id, off_t offset)
202 202 \group buffering API
203 ??? (see firmware/drivers/lcd-recorder.c:168) 203 \conditions ((CONFIG_CODEC == SWCODEC))
204 204 \param handle_id
205 void lcd_roll(int pixels); 205 \param offset
206 206 \return
207 Rolls up the lcd display by the specified amount of lines. 207 \description
208 Lines that are rolled out over the top of the screen are rolled in 208
209 from the bottom again. This is a hardware remapping only and all 209int bufalloc(const void *src, size_t size, enum data_type type)
210 operations on the lcd are affected. 210 \group buffering API
211 The screen is rolled up of pixel lines. The value must be between 211 \conditions ((CONFIG_CODEC == SWCODEC))
212 0 and LCD_HEIGHT. 212 \param src
213 [Not for simulator] 213 \param size
214 214 \param type
215 Player 215 \return
216 ------ 216 \description
217 217
218 void lcd_define_pattern(int pat, char *pattern); 218bool bufclose(int handle_id)
219 219 \group buffering API
220 Define a custom pattern of index pat. char *pattern is a 8x8 pixel 220 \conditions ((CONFIG_CODEC == SWCODEC))
221 bitmap. 221 \param handle_id
222 222 \return
223 unsigned char lcd_get_locked_pattern(void); 223 \description
224 224
225 Get a locked pattern index. 225ssize_t bufcuttail(int handle_id, size_t size)
226 (see firmware/drivers/lcd-player.c:382) 226 \group buffering API
227 227 \conditions ((CONFIG_CODEC == SWCODEC))
228 void lcd_unlock_pattern(unsigned char pat); 228 \param handle_id
229 229 \param size
230 Unlock pattern of index pat. 230 \return
231 231 \description
232 void lcd_putc(int x, int y, unsigned char ch); 232
233 233ssize_t bufgetdata(int handle_id, size_t size, void **data)
234 Put character c at coordinates (x,y). 234 \group buffering API
235 235 \conditions ((CONFIG_CODEC == SWCODEC))
236 void lcd_put_cursor(int x, int y, char cursor_char); 236 \param handle_id
237 237 \param size
238 Put cursor at coordinated (x,y). 238 \param data
239 See firmware/export/lcd.h for possible cursor_char values. 239 \return
240 240 \description
241 void lcd_remove_cursor(void); 241
242 242ssize_t bufgettail(int handle_id, size_t size, void **data)
243 Remove the cursor from the screen. 243 \group buffering API
244 244 \conditions ((CONFIG_CODEC == SWCODEC))
245 void lcd_icon(int icon, bool enable); 245 \param handle_id
246 246 \param size
247 ??? (see firmware/drivers/lcd-player.c:463) 247 \param data
248 248 \return
249 249 \description
250Buttons 250
251======= 251int bufopen(const char *file, size_t offset, enum data_type type)
252 252 \group buffering API
253 These functions work the same regardless of which keypad you have, but they 253 \conditions ((CONFIG_CODEC == SWCODEC))
254 return a different set of values. Note that the Recorder keypad has 10 254 \param file
255 keys, while the Player keypad only features 6. 255 \param offset
256 256 \param type
257 Possible return values can be found in the firmware/export/button.h file. 257 \return
258 258 \description
259 int button_get(bool block); 259
260 260ssize_t bufread(int handle_id, size_t size, void *dest)
261 Returns a bitmask for which keys were pressed. If 'block' is set TRUE it 261 \group buffering API
262 won't return until a key is pressed. 262 \conditions ((CONFIG_CODEC == SWCODEC))
263 263 \param handle_id
264 int button_get_w_tmo(int ticks); 264 \param size
265 265 \param dest
266 Wait for a key press for ticks ticks. (There are HZ ticks per second) 266 \return
267 Returns a bitmask for which keys were pressed. If no key was pressed, 267 \description
268 return BUTTON_NONE. 268
269 269int bufseek(int handle_id, size_t newpos)
270 int button_status(void); 270 \group buffering API
271 271 \conditions ((CONFIG_CODEC == SWCODEC))
272 Returns a bitmask for which keys are currently pressed. 272 \param handle_id
273 273 \param newpos
274 void button_clear_queue(void); 274 \return
275 275 \description
276 Empty the button queue. 276
277 277ssize_t buf_get_offset(int handle_id, void *ptr)
278 278 \conditions ((CONFIG_CODEC == SWCODEC))
279Files 279 \param handle_id
280===== 280 \param ptr
281 281 \return
282 (These functions are POSIX look-alikes) 282 \description
283 283
284 int open(const char *pathname, int flags); 284ssize_t buf_handle_offset(int handle_id)
285 285 \conditions ((CONFIG_CODEC == SWCODEC))
286 The open() function establishes the connection between a file and a file 286 \param handle_id
287 descriptor. It creates an open file description that refers to a file 287 \return
288 and a file descriptor that refers to that open file description. The file 288 \description
289 descriptor is used by other I/O functions to refer to that file. 289
290 290void buf_request_buffer_handle(int handle_id)
291 ssize_t read(int fd, void *buf, size_t count); 291 \conditions ((CONFIG_CODEC == SWCODEC))
292 292 \param handle_id
293 The read() function attempts to read count bytes from the file associated 293 \description
294 with the open file descriptor, fd, into the buffer pointed to by buf. 294
295 295void buf_set_base_handle(int handle_id)
296 off_t lseek(int fd, off_t offset, int whence); 296 \conditions ((CONFIG_CODEC == SWCODEC))
297 297 \param handle_id
298 The lseek() function sets the file pointer associated with the open file 298 \description
299 descriptor specified by fd as follows: 299
300 300size_t buf_used(void)
301 o If whence is SEEK_SET, the pointer is set to offset bytes. 301 \conditions ((CONFIG_CODEC == SWCODEC))
302 302 \return
303 o If whence is SEEK_CUR, the pointer is set to its 303 \description
304 current location plus offset. 304
305 305void buttonlight_off(void)
306 o If whence is SEEK_END, the pointer is set to the size 306 \group button
307 of the file plus offset. 307 \conditions (defined(HAVE_BUTTON_LIGHT))
308 308 \description
309 int creat(const char *pathname, mode_t mode) 309
310 310void buttonlight_on(void)
311 Create a file with mode O_RDONLY, O_WRONLY or O_RDWR. Returns the 311 \group button
312 file descriptor associated to this file. 312 \conditions (defined(HAVE_BUTTON_LIGHT))
313 313 \description
314 ssize_t write(int fd, const void *buf, size_t count); 314
315 315void buttonlight_set_brightness(int val)
316 Write writes up to count bytes to the file referenced by the file 316 \group button
317 descriptor fd from the buffer starting at buf. 317 \conditions (defined(HAVE_BUTTON_LIGHT)) && (defined(HAVE_BUTTONLIGHT_BRIGHTNESS))
318 318 \param val
319 int close(int fd); 319 \description
320 320
321 The close() function will deallocate the file descriptor indicated by 321void buttonlight_set_timeout(int value)
322 fd. To deallocate means to make the file descriptor available for 322 \group button
323 return by subsequent calls to open() or other functions that allocate 323 \conditions (defined(HAVE_BUTTON_LIGHT))
324 file descriptors. 324 \param value
325 Returns 0 upon success. 325 \description
326 326
327 int rename(const char *path, const char *newname); 327void button_clear_queue(void)
328 328 \group button
329 The rename() function changes the name of a file. The path argument 329 \description Empty the button queue
330 points to the pathname of the file to be renamed. The newname argument 330
331 points to the new pathname of the file. 331long button_get(bool block)
332 332 \group button
333 int remove(const char *pathname); 333 \param block If is set TRUE, button_get won't return until a key is pressed
334 334 \return a bitmask for which keys were pressed
335 remove() deletes a name from the filesystem. It calls unlink for files, 335 \description
336 and rmdir for directories. 336
337 337intptr_t button_get_data(void)
338 int ftruncate(int fd, off_t length); 338 \group button
339 339 \conditions (defined(HAVE_BUTTON_DATA))
340 Truncate file to the specified length. 340 \return
341 341 \description
342 int filesize(int fd); 342
343 343long button_get_w_tmo(int ticks)
344 Returns size of a file. Upon error, returns -1. 344 \group button
345 345 \param ticks
346 int fdprintf(int fd, const char *fmt, ...); 346 \return a bitmask for which keys were pressed; if no key was pressed, return BUTTON_NONE
347 347 \description Wait for a key press for =ticks= ticks. (there are HZ ticks per second)
348 Write a formated string in the fd. 348
349 Returns the number of characters writen to file. 349bool button_hold(void)
350 Returns a negative value upon error. 350 \group button
351 351 \conditions (defined(HAS_BUTTON_HOLD))
352 int read_line(int fd, char* buffer, int buffer_size); 352 \return
353 353 \description
354 Read (up to) a line of text from fd into buffer and return number of bytes 354
355 read (which may be larger than the number of bytes stored in buffer). If 355struct event_queue *button_queue
356 an error occurs, -1 is returned (and buffer contains whatever could be 356 \conditions !defined(HAVE_LCD_CHARCELLS) )) && (defined(HAVE_LCD_ENABLE
357 read). A line is terminated by a LF char. Neither LF nor CR chars are 357 \return
358 stored in buffer. 358 \description
359 359
360 int settings_parseline(char* line, char** name, char** value); 360int button_queue_count(void)
361 361 \group button
362 Parse a line from a configuration file. The line format is: 362 \return
363 name: value 363 \description
364 Any whitespace before setting name or value (after ':') is ignored. 364
365 A # as first non-whitespace character discards the whole line. 365int button_status(void)
366 Function sets pointers to null-terminated setting name and value. 366 \group button
367 Returns false if no valid config entry was found 367 \return a bitmask for which keys are currently pressed
368 368 \description
369 int ata_sleep(void) 369
370 370void cancel_cpu_boost(void)
371 Give the disk some rest. 371 \conditions (defined(HAVE_SCHEDULER_BOOSTCTRL))
372 [Not for simulator] 372 \description Unboosts the CPU for the current thread
373 373
374 374const unsigned char *font_get_bits( struct font *pf, unsigned short char_code )
375Directories 375 \conditions !defined(HAVE_LCD_CHARCELLS)
376=========== 376 \param pf
377 377 \param char_code
378 DIR *opendir(const char *name); 378 \return
379 379 \description
380 The opendir() function opens a directory stream corresponding to the 380
381 directory name, and returns a pointer to the directory stream. The 381const unsigned char* utf8decode(const unsigned char *utf8, unsigned short *ucs)
382 stream is positioned at the first entry in the directory. 382 \group unicode stuff
383 383 \param utf8
384 struct dirent *readdir(DIR *dir); 384 \param ucs
385 385 \return
386 The readdir() function returns a pointer to a dirent structure 386 \description
387 representing the next directory entry in the directory stream pointed to 387
388 by dir. It returns NULL on reaching the end-of-file or if an error 388const unsigned char *_ctype_
389 occurred. 389 \group strings and memory
390 390 \return
391 struct dirent { 391 \description
392 unsigned char d_name[MAX_PATH]; 392
393 int attribute; 393bool charger_inserted(void)
394 int size; 394 \group power
395 int startcluster; 395 \conditions (CONFIG_CHARGING)
396 unsigned short wrtdate; /* Last write date */ 396 \return
397 unsigned short wrttime; /* Last write time */ 397 \description
398 }; 398
399 399bool charging_state(void)
400 int closedir(DIR *dir); 400 \group power
401 401 \conditions (CONFIG_CHARGING) && (CONFIG_CHARGING == CHARGING_MONITOR)
402 The closedir() function closes the directory stream associated with dir. 402 \return
403 The directory stream descriptor dir is not available after this call. 403 \description
404 404
405 405int closedir(DIR* dir)
406Kernel 406 \group dir
407====== 407 \param dir
408 408 \return
409 void sleep(ticks); 409 \description The closedir() function closes the directory stream associated with =dir=. The directory stream descriptor dir is not available after this call.
410 410
411 Sleep a specified number of ticks, we have HZ ticks per second. 411int codec_load_file(const char* codec, struct codec_api *api)
412 412 \group misc
413 void yield(void); 413 \conditions (CONFIG_CODEC == SWCODEC)
414 414 \param codec
415 Let another thread run. This should be used as soon as you have to "wait" 415 \param api
416 for something or similar, and also if you do anything that takes "a long 416 \return
417 time". This function is the entire foundation that our "cooperative 417 \description
418 multitasking" is based on. Use it. 418
419 419int count_mp3_frames(int fd, int startpos, int filesize, void (*progressfunc)(int))
420 void gui_usb_screen_run(void); 420 \group misc
421 421 \param fd
422 Show the usb connection screen. 422 \param startpos
423 423 \param filesize
424 long current_tick; 424 \param progressfunc
425 425 \return
426 The global tick variable. 426 \description
427 427
428 int default_event_handler(int event); 428void cpu_boost(bool on_off)
429 429 \conditions (!defined(SIMULATOR)) && (defined(HAVE_ADJUSTABLE_CPU_FREQ)) && !defined(CPU_BOOST_LOGGING)
430 If event == SYS_USB_CONNECTED, call gui_usb_screen_run and return 430 \param on_off
431 SYS_USB_CONNECTED. Else do nothing and return 0. 431 \description Boosts the CPU if =on_off= is true, otherwise it unboosts the CPU
432 432
433 int create_thread(void* function, void* stack, int stack_size, 433void cpu_boost_(bool on_off,char*location,int line)
434 const char *name IF_PRIO(int priority) 434 \conditions (!defined(SIMULATOR)) && (defined(HAVE_ADJUSTABLE_CPU_FREQ)) && (defined(CPU_BOOST_LOGGING))
435 IF_COP(, unsigned int core, bool fallback)); 435 \param on_off
436 436 \param charlocation
437 Create a thread. 437 \param line
438 ??? (see firmware/thread.c:145) 438 \description
439 Return its ID if context area could be allocated, else return -1. 439
440 440long *cpu_frequency
441 void remove_thread(int threadnum); 441 \conditions (!defined(SIMULATOR))
442 442 \return the current cpu frequency
443 Remove a thread from the scheduler. 443 \description
444 Parameter is the ID as returned from create_thread(). 444
445 445char *create_numbered_filename(char *buffer, const char *path, const char *prefix, const char *suffix, int numberlen IF_CNFN_NUM_(, int *num))
446 void reset_poweroff_timer(void); 446 \group file
447 447 \param buffer
448 The function name pretty much says what it's supposed to do. 448 \param path
449 449 \param prefix
450 450 \param suffix
451String/Memory 451 \param num
452============= 452 \param numberlen
453 453 \return
454 int strcmp(const char *a, const char *b); 454 \description
455 455
456 strcmp compares the string a to string b. If a sorts lexicographically 456struct thread_entry* create_thread(void (*function)(void), void* stack, size_t stack_size, unsigned flags, const char *name IF_PRIO(, int priority) IF_COP(, unsigned int core))
457 after b, strcmp returns a number greater than zero. If the two strings 457 \group kernel/ system
458 match, strcmp returns zero. If a sorts lexicographically before b, 458 \param function
459 strcmp returns a number less than zero. 459 \param stack
460 460 \param stack_size
461 char *strcpy(char *dst, const char *src); 461 \param flags
462 462 \param priority
463 strcpy copies the string pointed to by src (including the terminating 463 \param core
464 null character) to the arra pointed to by dst. 464 \param name
465 This function returns the initial value of dst. 465 \return its ID if context area could be allocated, else return -1
466 466 \description Creates a thread
467 void *memcpy(void *out, const void *in, size_t length); 467 \see [W[RockboxKernel#struct_thread_entry_create_threa]]
468 468
469 Copies length bytes of data in memory from source to dest. 469int create_xing_header(int fd, long startpos, long filesize, unsigned char *buf, unsigned long num_frames, unsigned long rec_time, unsigned long header_template, void (*progressfunc)(int), bool generate_toc)
470 470 \group misc
471 void *memset(void *dst, int c, size_t length); 471 \param fd
472 472 \param startpos
473 Fills a memory region with specified byte value. 473 \param filesize
474 474 \param buf
475 int snprintf(char *buf, size_t size, const char *fmt, ...); 475 \param num_frames
476 476 \param rec_time
477 Write a formated formated string in buffer buf of size size 477 \param header_template
478 (including the trailing '\0'). 478 \param progressfunc
479 Upon success, return the number of characters printed or that would have 479 \param generate_toc
480 been printed if the output was truncated (not including the trailing 480 \return
481 '\0'). 481 \description
482 These support %c, %s, %d and %x only with the width and zero padding 482
483 flag only. 483volatile long* current_tick
484 484 \group kernel/ system
485 char *strncpy(char *dst, const char *src, size_t length); 485 \return
486 486 \description
487 strncpy copies not more than length characters from the string pointed 487
488 to by src (including the terminating null character) to the array pointed 488void debugf(const char *fmt, ...) ATTRIBUTE_PRINTF(1, 2)
489 to by dst. If the string pointed to by src is shorter than length 489 \group misc
490 characters, null characters are apended to the destination array until 490 \conditions (defined(DEBUG) || defined(SIMULATOR))
491 a total of length characters have been written. 491 \param fmt
492 This function returns the initial value of dst. 492 \description Prints =fmt= in a printf-like fashion to STDERR
493 493
494 size_t strlen(const char *str); 494long default_event_handler(long event)
495 495 \group kernel/ system
496 The strlen function works out the length of the string starting at str 496 \param event
497 by counting characters until it reaches a null character. 497 \return SYS_USB_CONNECTED and call usb_screen() if =event= equals to SYS_USB_CONNECTED, else do nothing and return 0
498 strlen returns the character count. 498 \description
499 499
500 char *strrchr(const char *string, int c); 500long default_event_handler_ex(long event, void (*callback)(void *), void *parameter)
501 501 \group kernel/ system
502 This function finds the last occurence of c (converted to a char) in the 502 \param event
503 string pointed to by string (including the terminating null character). 503 \param callback
504 Returns a pointer to the located character, or a null pointer if c 504 \param parameter
505 does not occur in string. 505 \return
506 506 \description
507 int strcasecmp(const char *s1, const char *s2); 507
508 508bool detect_flashed_ramimage(void)
509 The strcasecmp() function compares the two strings s1 and s2, ignoring 509 \group Routines for the iriver_flash -plugin.
510 the case of the characters. It returns an integer less than, equal to, 510 \conditions (defined(IRIVER_H100_SERIES))
511 or greater than zero if s1 is found, respectively, to be less than, to 511 \return
512 match, or be greater than s2. 512 \description
513 513
514 int strncasecmp(const char *s1, const char *s2, size_t n); 514bool detect_flashed_romimage(void)
515 515 \group Routines for the iriver_flash -plugin.
516 Like strncasecmp() but only on the first n characters. 516 \conditions (defined(IRIVER_H100_SERIES))
517 {new in plugin API version 26} 517 \return
518 518 \description
519 const char *_ctype_; 519
520 520bool detect_original_firmware(void)
521 ??? (see firmware/common/ctype.c) 521 \group Routines for the iriver_flash -plugin.
522 [Not for simulator] 522 \conditions (defined(IRIVER_H100_SERIES))
523 523 \return
524 int atoi(const char *str); 524 \description
525 525
526 The atoi() function converts the initial portion of a string pointed 526bool dir_exists(const char *path)
527 to by str to int. 527 \group dir
528 528 \param path
529 529 \return
530Sound 530 \description
531===== 531
532 532int do_menu(const struct menu_item_ex *menu, int *start_selected, struct viewport parent[NB_SCREENS], bool hide_bars)
533 void mpeg_sound_set(int setting, int value); 533 \group menu
534 534 \param menu
535 The function mpeg_sound_set() is used to set sound output characteristics. 535 \param start_selected
536 This characterisitic is chosen with the setting argument. Possible 536 \param parent[NB_SCREENS]
537 settings (and the effective values) are : 537 \param hide_bars
538 SOUND_VOLUME 538 \return
539 0 <= value <= 100 539 \description
540 SOUND_BALANCE (only effective with MAS3587F) 540
541 -100 <= value <= 100 541intptr_t dsp_configure(struct dsp_config *dsp, int setting, intptr_t value)
542 SOUND_BASS 542 \group sound
543 -32 <= value <= 32 543 \conditions (CONFIG_CODEC == SWCODEC)
544 SOUND_TREBLE 544 \param dsp
545 -32 <= value <= 32 545 \param setting
546 SOUND_CHANNEL 546 \param value
547 value : MPEG_SOUND_STEREO 547 \return
548 MPEG_SOUND_MONO 548 \description
549 MPEG_SOUND_MONO_LEFT 549
550 MPEG_SOUND_MONO_RIGHT 550void dsp_dither_enable(bool enable)
551 MPEG_SOUND_STEREO_NARROW 551 \group sound
552 MPEG_SOUND_STEREO_WIDE 552 \conditions (CONFIG_CODEC == SWCODEC)
553 MPEG_SOUND_KARAOKE 553 \param enable
554 554 \description
555 only available with MAS3587F : 555
556 SOUND_LOUDNESS 556int dsp_process(struct dsp_config *dsp, char *dest, const char *src[], int count)
557 0 <= value <= 17 557 \group sound
558 SOUND_AVC 558 \conditions (CONFIG_CODEC == SWCODEC)
559 value : 1 : 20ms 559 \param dsp
560 2 : 2s 560 \param dest
561 3 : 4s 561 \param src[]
562 4 : 8s 562 \param count
563 -1 : off then on 563 \return
564 other : off 564 \description
565 SOUND_MDB_STRENGTH 565
566 0 <= value <= 127 566void dsp_set_crossfeed(bool enable)
567 SOUND_MDB_HARMONICS 567 \group sound
568 0 <= value <= 100 568 \conditions (CONFIG_CODEC == SWCODEC)
569 SOUND_MDB_CENTER 569 \param enable
570 value : ??? 570 \description
571 SOUND_MDB_SHAPE 571
572 value : ??? 572void dsp_set_eq(bool enable)
573 SOUND_MDB_ENABLE 573 \group sound
574 value == 0 : off 574 \conditions (CONFIG_CODEC == SWCODEC)
575 other : on 575 \param enable
576 SOUND_SUPERBASS 576 \description
577 value == 0 : off 577
578 other : on 578void event_init(struct event *e, unsigned int flags)
579 579 \conditions (defined(HAVE_EVENT_OBJECTS))
580 580 \param e
581 void mp3_play_data(unsigned char* start, int size, 581 \param flags
582 void (*get_more)(unsigned char** start, int* size)); 582 \description
583 583
584 Plays a chunk of an mp3 file. 584void event_set_state(struct event *e, unsigned int state)
585 start points to the begining of the file to play. 585 \conditions (defined(HAVE_EVENT_OBJECTS))
586 size is the size to play. 586 \param e
587 getmore is a callback function. 587 \param state
588 ??? (see firmware/mp3_playback.c:1062) 588 \description
589 [Not for simulator] 589
590 590void event_wait(struct event *e, unsigned int for_state)
591 void mp3_play_pause(bool play); 591 \conditions (defined(HAVE_EVENT_OBJECTS))
592 592 \param e
593 If playback was paused and play is TRUE, resume playback. 593 \param for_state
594 If playback isn't paused and play is FALSE, pause playback. 594 \description
595 [Not for simulator] 595
596 596int fdprintf(int fd, const char *fmt, ...) ATTRIBUTE_PRINTF(2, 3)
597 void mp3_play_stop(void); 597 \group file
598 598 \param fd
599 Stop playback. 599 \param fmt
600 [Not for simulator] 600 \return number of characters writen to =fd= or a negative value upon error
601 601 \description Write a formated string in the =fd=
602 bool mp3_is_playing(void); 602
603 603bool file_exists(const char *file)
604 Return true if an mp3 is playing, else return false. Note : a paused 604 \group file
605 mp3 is considered as a playing mp3. 605 \param file
606 [Not for simulator] 606 \return
607 607 \description
608 void bitswap(unsigned char *data, int length); 608
609 609bool find_albumart(const struct mp3entry *id3, char *buf, int buflen)
610 Swap the bits for each element of array data of size length. 610 \conditions (defined(HAVE_ALBUMART))
611 [Not for simulator] 611 \param id3
612 612 \param buf
613 613 \param buflen
614Playback Control 614 \return
615================ 615 \description
616 616
617 void mpeg_play(int offset); 617unsigned long find_next_frame(int fd, long *offset, long max_offset, unsigned long last_header)
618 618 \group misc
619 Start playback. 619 \param fd
620 ??? what does offset do (see firmware/mpeg.c:2459) 620 \param offset
621 621 \param max_offset
622 void mpeg_stop(void); 622 \param last_header
623 623 \return
624 Stop playback. 624 \description
625 625
626 void mpeg_pause(void); 626void flush_icache(void)
627 627 \conditions (defined(CACHE_FUNCTIONS_AS_CALL))
628 Pause playback. 628 \description
629 629
630 void mpeg_resume(void); 630struct font* font_get(int font)
631 631 \conditions !defined(HAVE_LCD_CHARCELLS)
632 Resume playback. 632 \param font
633 633 \return the font structure for =font=
634 void mpeg_next(void); 634 \description If the requested font isn't loaded/compiled-in, decrement the font number and try again.
635 635 \see [S[firmware/export/font.h]]
636 Play the next item in playlist. 636
637 637int font_getstringsize(const unsigned char *str, int *w, int *h, int fontnumber)
638 void mpeg_prev(void); 638 \conditions !defined(HAVE_LCD_CHARCELLS)
639 639 \param str
640 Play the previous item in playlist. 640 \param w
641 641 \param h
642 void mpeg_ff_rewind(int newtime); 642 \param fontnumber
643 643 \return
644 Change playback time. 644 \description
645 Has no effect in simulator. 645
646 646int font_get_width(struct font* pf, unsigned short char_code)
647 struct mp3entry *mpeg_next_track(void); 647 \conditions !defined(HAVE_LCD_CHARCELLS)
648 648 \param pf
649 Return info about the next track. 649 \param char_code
650 struct mp3entry is defined in file firmware/export/id3.h 650 \return
651 651 \description
652 int playlist_amount(void); 652
653 653struct font* font_load(const char *path)
654 Returns the number of tracks in current playlist. 654 \conditions !defined(HAVE_LCD_CHARCELLS)
655 655 \param path
656 int mpeg_status(void); 656 \return
657 657 \description Load font =path= and returns a struct font pointer for it
658 Returns a bitmask about current mpeg stream status. 658 \see [S[firmware/export/font.h]]
659 Possibilities are : 659
660 MPEG_STATUS_PLAY 660int get_action(int context, int timeout)
661 MPEG_STATUS_PAUSE 661 \group action handling
662 MPEG_STATUS_RECORD [MAS3587F only] 662 \param context
663 MPEG_STATUS_PRERECORD [MAS3587F only] 663 \param timeout
664 MPEG_STATUS_ERROR 664 \return
665 665 \description
666 bool mpeg_has_changed_track(void); 666
667 667const char *get_codec_filename(int cod_spec)
668 Returns true if track has changed since last call of this function. 668 \group misc
669 Else returns false. 669 \conditions (CONFIG_CODEC == SWCODEC)
670 670 \param cod_spec
671 struct mp3entry *mpeg_current_track(void); 671 \return
672 672 \description
673 Return info about current track 673
674 struct mp3entry is defined in file firmware/export/id3.h 674int get_custom_action(int context,int timeout, const struct button_mapping* (*get_context_map)(int))
675 675 \group action handling
676 676 \param context
677MAS communication 677 \param timeout
678================= 678 \param get_context_map
679 679 \return
680 [Not for simulator] 680 \description
681 681
682 int mas_readmem(int bank, int addr, unsigned long* dest, int len); 682bool get_metadata(struct mp3entry* id3, int fd, const char* trackname)
683 683 \group misc
684 ??? 684 \conditions (CONFIG_CODEC == SWCODEC)
685 685 \param id3
686 int mas_writemem(int bank, int addr, unsigned long* src, int len); 686 \param fd
687 687 \param trackname
688 ??? 688 \return
689 689 \description
690 int mas_readreg(int reg); 690
691 691struct tm* get_time(void)
692 ??? 692 \group misc
693 693 \return current time
694 int mas_writereg(int reg, unsigned int val); 694 \description
695 695 \see [S[firmware/include/time.h]]
696 ??? 696
697 697struct user_settings* global_settings
698 int mas_codec_writereg(int reg, unsigned int val); 698 \group misc
699 699 \return the global_settings struct
700 ??? 700 \description
701 [MAS3587F only] 701 \see [S[apps/settings.h]]
702 702
703 int mas_codec_readreg(int reg); 703struct system_status *global_status
704 704 \group misc
705 ??? 705 \return the global_status struct
706 [MAS3587F only] 706 \description
707 707 \see [S[apps/settings.h]]
708 708
709Misc 709void gui_scrollbar_draw(struct screen * screen, int x, int y, int width, int height, int items, int min_shown, int max_shown, unsigned flags)
710==== 710 \conditions !defined(HAVE_LCD_CHARCELLS)
711 711 \param screen
712 void srand(unsigned int seed); 712 \param x
713 713 \param y
714 Seed the random number generator. 714 \param width
715 715 \param height
716 int rand(void); 716 \param items
717 717 \param min_shown
718 Return a pseudo random number between 0 and 0x7fffffff. 718 \param max_shown
719 719 \param flags
720 void qsort(void *base, size_t nmemb, size_t size, 720 \description
721 int(*compar)(const void *, const void *)); 721
722 722void gui_synclist_add_item(struct gui_synclist * lists)
723 qsort sorts an array (begining at base) of nmemb objects, size 723 \group list
724 describes the size of each element of the array. 724 \param lists
725 725 \description
726 You must supply a pointer to a comparison function, using the 726
727 argument shown as compar. (This permits the sorting objects of 727void gui_synclist_del_item(struct gui_synclist * lists)
728 unknown properties.) Define the comparison function to accept 728 \group list
729 two arguments, each a pointer to an element of the array starting 729 \param lists
730 at base. The result of (*compar) must be negative if the first 730 \description
731 argument is less than the second, zero if the two arguments match, 731
732 and positive if the first argument is greater than the second 732bool gui_synclist_do_button(struct gui_synclist * lists, unsigned *action, enum list_wrap wrap)
733 (chere ``less than'' and ``greter than'' refer to whatever 733 \group list
734 arbitrary ordering is appropriate). 734 \param lists
735 735 \param action
736 The arra is sorted in place; that is, when qsort returns, the array 736 \param wrap
737 elements begining at base have been reordered. 737 \return
738 738 \description
739 int kbd_input(char *buffer, int buflen); 739
740 740void gui_synclist_draw(struct gui_synclist * lists)
741 Prompt for a string to be stored in buffer which is of length buflen. 741 \group list
742 Return 0 upon success, negative on failure. 742 \param lists
743 743 \description
744 struct tm *get_time(void); 744
745 745int gui_synclist_get_nb_items(struct gui_synclist * lists)
746 Return current time. 746 \group list
747 struct tm 747 \param lists
748 { 748 \return
749 int tm_sec; 749 \description
750 int tm_min; 750
751 int tm_hour; 751int gui_synclist_get_sel_pos(struct gui_synclist * lists)
752 int tm_mday; 752 \group list
753 int tm_mon; 753 \param lists
754 int tm_year; 754 \return
755 int tm_wday; 755 \description
756 int tm_yday; 756
757 int tm_isdst; 757void gui_synclist_init(struct gui_synclist * lists, list_get_name callback_get_item_name, void * data, bool scroll_all,int selected_size, struct viewport parent[NB_SCREENS])
758 }; 758 \group list
759 759 \param lists
760 int set_time(struct tm *tm); 760 \param callback_get_item_name
761 761 \param data
762 Set current time. 762 \param scroll_all
763 Return FALSE upon success. 763 \param selected_size
764 (see get_time() for a description of struct tm) 764 \param parent[NB_SCREENS]
765 765 \description
766 void *plugin_get_buffer(int *buffer_size); 766
767 767void gui_synclist_limit_scroll(struct gui_synclist * lists, bool scroll)
768 Returns a pointer to the portion of the plugin buffer that is not 768 \group list
769 already being used. If no plugin is loaded, returns the entire 769 \param lists
770 plugin buffer. 770 \param scroll
771 Upon return, *buffer_size is the memory size left in plugin buffer. 771 \description
772 772
773 void *plugin_get_mp3_buffer(int *buffer_size); 773void gui_synclist_select_item(struct gui_synclist * lists, int item_number)
774 774 \group list
775 Returns a pointer to the mp3 buffer. 775 \param lists
776 Playback gets stopped to avoid conflicts. 776 \param item_number
777 777 \description
778 int plugin_register_timer(int cycles, int prio, 778
779 void (*timer_callback)(void)); 779void gui_synclist_set_icon_callback(struct gui_synclist * lists, list_get_icon icon_callback)
780 780 \group list
781 Register a periodic time callbeck, called every 'cycles' CPU clocks. 781 \param lists
782 Note that this function will be called in interrupt context! 782 \param icon_callback
783 [Not for simulator] 783 \description
784 784
785 void plugin_unregister_timer(void); 785void gui_synclist_set_nb_items(struct gui_synclist * lists, int nb_items)
786 786 \group list
787 Disable the user timer. 787 \param lists
788 [Not for simulator] 788 \param nb_items
789 789 \description
790 void plugin_tsr(void (*exit_callback)(void)); 790
791 791void gui_synclist_set_title(struct gui_synclist *lists, char* title, int icon)
792 The plugin wants to stay resdent after leaving its main function, e.g. 792 \group list
793 runs from timer or own thread. The callback is registered to later 793 \param lists
794 instruct it to free its resources before a new plugin gets loaded. 794 \param title
795 795 \param icon
796 void debugf(char *fmt, ...); 796 \description
797 797
798 Debug output in formated string format. 798void gui_syncstatusbar_draw(struct gui_syncstatusbar * bars, bool force_redraw)
799 [Simulator or debug only] 799 \group scroll bar
800 800 \param bars
801 struct user_settings *global_settings; 801 \param force_redraw refreshes =bars= if true
802 802 \description Draws an initialized statusbar =bars= on the screen and refreshs it if =force_redraw= is true.
803 Access to rockbox's settings. 803 \see [S[apps/gui/statusbar.h]]
804 struct user_settings is defined in apps/settings.h 804
805 805enum yesno_res gui_syncyesno_run(const struct text_message * main_message, const struct text_message * yes_message, const struct text_message * no_message)
806 void backlight_set_timeout(int index); 806 \group list
807 807 \param main_message
808 Set the backlight timeout. 808 \param yes_message
809 index possible values : 809 \param no_message
810 0 : backlight always off 810 \return
811 1 : no time out 811 \description
812 2 : 1s 812
813 3 : 2s 813void i2c_begin(void)
814 4 : 3s 814 \group MAS communication
815 5 : 4s 815 \conditions (!defined(SIMULATOR) && (CONFIG_CODEC != SWCODEC)) && ((CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F))
816 6 : 5s 816 \description
817 7 : 6s 817
818 8 : 7s 818void i2c_end(void)
819 9 : 8s 819 \group MAS communication
820 10 : 9s 820 \conditions (!defined(SIMULATOR) && (CONFIG_CODEC != SWCODEC)) && ((CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F))
821 11 : 10s 821 \description
822 12 : 15s 822
823 13 : 20s 823int i2c_write(int address, const unsigned char* buf, int count )
824 14 : 25s 824 \group MAS communication
825 15 : 30s 825 \conditions (!defined(SIMULATOR) && (CONFIG_CODEC != SWCODEC)) && ((CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F))
826 16 : 45s 826 \param address
827 17 : 60s 827 \param buf
828 18 : 90s 828 \param count
829 other : backlight always off 829 \return
830 830 \description
831 bool mp3info(mp3entry *entry, char *filename); 831
832 832void invalidate_icache(void)
833 Return FALSE if successful. The given mp3entry is then filled in with 833 \conditions (defined(CACHE_FUNCTIONS_AS_CALL))
834 whatever id3 info it could find about the given file. 834 \description
835 struct mp3entry is defined in file firmware/export/id3.h 835
836 836unsigned char* iso_decode(const unsigned char *iso, unsigned char *utf8, int cp, int count)
837 int count_mp3_frames(int fd, int startpos, int filesize, 837 \group unicode stuff
838 void (*progressfunc)(int)); 838 \param iso
839 839 \param utf8
840 ??? (see firmware/mp3data.c:531) 840 \param cp
841 something related to VBR files 841 \param count
842 842 \return
843 int create_xing_header(int fd, int startpos, int filesize, 843 \description
844 unsigned char *buf, int num_frames, 844
845 unsigned long header_template, 845bool is_backlight_on(bool ignore_always_off)
846 void (*progressfunc)(int), bool generate_toc); 846 \param ignore_always_off
847 847 \return
848 ??? (see firmware/mp3data.c:593) 848 \description
849 849
850 int battery_level(void); 850int kbd_input(char* buffer, int buflen)
851 851 \group misc
852 Returns battery level in percent. 852 \param buffer
853 On the simulator, battery_level always returns 75. 853 \param buflen
854 854 \return 0 upon success, negative upon failure
855 void mpeg_set_pitch(int pitch); 855 \description Prompt for a string to be stored in =buffer= which is of length =buflen=
856 856
857 Change the pitch of audio playback. pitch is given in tenths of 857void lcd_bitmap(const fb_data *src, int x, int y, int width, int height)
858 percent. 858 \group lcd
859 [MAS3587F only] 859 \conditions !defined(HAVE_LCD_CHARCELLS) && (LCD_DEPTH > 1)
860 {new in plugin API version 26} 860 \param src
861 861 \param x
862 unsigned short peak_meter_scale_value(unsigned short val, int meterwidth); 862 \param y
863 863 \param width
864 Scales a peak value as read from the MAS to the range of meterwidth. 864 \param height
865 The scaling is performed according to the scaling method (dBfs / linear) 865 \description Put a bitmap at given XY coordinates. Element src[i] is the binary representation of column number i of the bitmap read from bottom to top.
866 and the range (peak_meter_range_min .. peak_meter_range_max). 866
867 unsigned short val is the volume value. Range: 0 <= val < MAX_PEAK 867void lcd_bitmap_part(const fb_data *src, int src_x, int src_y, int stride, int x, int y, int width, int height)
868 int meterwidht is the widht of the meter in pixel 868 \group lcd
869 Returns an a value between 0 and meterwidth 869 \conditions !defined(HAVE_LCD_CHARCELLS) && (LCD_DEPTH > 1)
870 [MAS3587F only] 870 \param src
871 {new in plugin API version 26} 871 \param src_x
872 872 \param src_y
873 void peak_meter_set_use_dbfs(int use); 873 \param stride
874 874 \param x
875 Specifies wether the values displayed are scaled as dBfs or as 875 \param y
876 linear percent values. If use is 0 use linear percent scale, else 876 \param width
877 use dBfs. 877 \param height
878 [MAS3587F only] 878 \description
879 {new in plugin API version 26} 879
880 880void lcd_bitmap_transparent(const fb_data *src, int x, int y, int width, int height)
881 int peak_meter_get_use_dbfs(void); 881 \group lcd
882 882 \conditions !defined(HAVE_LCD_CHARCELLS) && (LCD_DEPTH == 16)
883 Returns 1 if the meter currently is displaying dBfs values, 0 883 \param src
884 if the meter is displaying percent values. 884 \param x
885 [MAS3587F only] 885 \param y
886 {new in plugin API version 26} 886 \param width
887 887 \param height
888 void mpeg_flush_and_reload_tracks(void); 888 \description
889 889
890 ??? Flush the mpeg buffer and reload data ??? 890void lcd_bitmap_transparent_part(const fb_data *src, int src_x, int src_y, int stride, int x, int y, int width, int height)
891 (see firmware/mpeg.c:2597) 891 \group lcd
892 (has no effect on simulator) 892 \conditions !defined(HAVE_LCD_CHARCELLS) && (LCD_DEPTH == 16)
893 {new in plugin API version 26} 893 \param src
894 894 \param src_x
895 int mpeg_get_file_pos(void); 895 \param src_y
896 896 \param stride
897 ??? Returns the current cursor position in mpeg file ??? 897 \param x
898 (see firmware/mpeg.c:260) 898 \param y
899 {new in plugin API version 26} 899 \param width
900 900 \param height
901 unsigned long find_next_frame(int fd, int *offset, int max_offset, 901 \description
902 unsigned long last_header); 902
903 903void lcd_blit_grey_phase(unsigned char *values, unsigned char *phases, int bx, int by, int bwidth, int bheight, int stride)
904 ??? 904 \group lcd
905 (see firmware/mp3data.c:262) 905 \conditions !defined(HAVE_LCD_CHARCELLS) )) && ((LCD_DEPTH < 4) && !defined(SIMULATOR
906 {new in plugin API version 26} 906 \param values
907 907 \param phases
908 unsigned long mpeg_get_last_header(void); 908 \param bx
909 909 \param by
910 ??? 910 \param bwidth
911 (see firmware/mpeg.c:320) 911 \param bheight
912 {new in plugin API version 26} 912 \param stride
913 \description
914
915void lcd_blit_mono(const unsigned char *data, int x, int by, int width, int bheight, int stride)
916 \group lcd
917 \conditions !defined(HAVE_LCD_CHARCELLS) )) && ((LCD_DEPTH < 4) && !defined(SIMULATOR
918 \param data
919 \param x
920 \param by
921 \param width
922 \param bheight
923 \param stride
924 \description
925
926void lcd_blit_yuv(unsigned char * const src[3], int src_x, int src_y, int stride, int x, int y, int width, int height)
927 \group lcd
928 \conditions !defined(HAVE_LCD_CHARCELLS) && (LCD_DEPTH == 16)
929 \param src[3]
930 \param src_x
931 \param src_y
932 \param stride
933 \param x
934 \param y
935 \param width
936 \param height
937 \description
938
939void lcd_clear_display(void)
940 \group lcd
941 \description Clears the LCD and the framebuffer
942
943void lcd_define_pattern(unsigned long ucs, const char *pattern)
944 \group lcd
945 \conditions (defined(HAVE_LCD_CHARCELLS))
946 \param ucs
947 \param pattern is a 8x8 pixelbitmap
948 \description Define a custom pattern for index =ucs=
949
950void lcd_double_height(bool on)
951 \group lcd
952 \conditions (defined(HAVE_LCD_CHARCELLS))
953 \param on
954 \description
955
956void lcd_drawline(int x1, int y1, int x2, int y2)
957 \group lcd
958 \conditions !defined(HAVE_LCD_CHARCELLS)
959 \param x1 X top coordinate
960 \param y1 Y top coordinate
961 \param x2 X bottom coordinate
962 \param y2 Y bottom coordinate
963 \description Draws a line at (=x1=, =y1=) -> (=x2=, =y2=) within current drawing mode
964
965void lcd_drawpixel(int x, int y)
966 \group lcd
967 \conditions !defined(HAVE_LCD_CHARCELLS)
968 \param x
969 \param y
970 \description Draws a pixel at (=x=, =y=) within current drawing mode
971
972void lcd_drawrect(int x, int y, int width, int height)
973 \group lcd
974 \conditions !defined(HAVE_LCD_CHARCELLS)
975 \param x
976 \param y
977 \param width
978 \param height
979 \description Draws a rectangle at (=x=, =y=) -> (=x= + =width=, =y= + =height=) within current drawing mode
980
981void lcd_fillrect(int x, int y, int width, int height)
982 \group lcd
983 \conditions !defined(HAVE_LCD_CHARCELLS)
984 \param x
985 \param y
986 \param width
987 \param height
988 \description Draws a filled rectangle at (=x=, =y=) -> (=x= + =width=, =y= + =height=) within current drawing mode
989
990fb_data* lcd_framebuffer
991 \group lcd
992 \conditions !defined(HAVE_LCD_CHARCELLS)
993 \return
994 \description Pointer to the framebuffer
995 \see [S[firmware/export/lcd.h]]
996
997int lcd_getstringsize(const unsigned char *str, int *w, int *h)
998 \group lcd
999 \param str String
1000 \param w Width
1001 \param h Height
1002 \return Success or not
1003 \description Stores the width and height of the string in =w= and =h=
1004
1005fb_data* lcd_get_backdrop(void)
1006 \group lcd
1007 \conditions !defined(HAVE_LCD_CHARCELLS) && (LCD_DEPTH > 1)
1008 \return Pointer to framebuffer data
1009 \description Gets the current backdrop
1010 \see lcd_framebuffer
1011
1012unsigned lcd_get_background(void)
1013 \group lcd
1014 \conditions !defined(HAVE_LCD_CHARCELLS) && (LCD_DEPTH > 1)
1015 \return
1016 \description
1017
1018int lcd_get_drawmode(void)
1019 \group lcd
1020 \conditions !defined(HAVE_LCD_CHARCELLS)
1021 \return current LCD drawing mode
1022 \description
1023
1024unsigned lcd_get_foreground(void)
1025 \group lcd
1026 \conditions !defined(HAVE_LCD_CHARCELLS) && (LCD_DEPTH > 1)
1027 \return
1028 \description
1029
1030unsigned long lcd_get_locked_pattern(void)
1031 \group lcd
1032 \conditions (defined(HAVE_LCD_CHARCELLS))
1033 \return
1034 \description Get a locked pattern index
1035 \see [S[firmware/drivers/lcd-player.c]]
1036
1037void lcd_hline(int x1, int x2, int y)
1038 \group lcd
1039 \conditions !defined(HAVE_LCD_CHARCELLS)
1040 \param x1 X start coordinate
1041 \param x2 X end coordinate
1042 \param y Y coordinate
1043 \description Draws a horizontal line at (=x1=, =y=) -> (=x2=, =y=) within current drawing mode
1044
1045void lcd_icon(int icon, bool enable)
1046 \group lcd
1047 \conditions (defined(HAVE_LCD_CHARCELLS))
1048 \param icon
1049 \param enable
1050 \description
1051 \see [S[firmware/drivers/lcd-player.c]]
1052
1053void lcd_mono_bitmap(const unsigned char *src, int x, int y, int width, int height)
1054 \group lcd
1055 \conditions !defined(HAVE_LCD_CHARCELLS)
1056 \param src
1057 \param x
1058 \param y
1059 \param width
1060 \param height
1061 \description
1062
1063void lcd_mono_bitmap_part(const unsigned char *src, int src_x, int src_y, int stride, int x, int y, int width, int height)
1064 \group lcd
1065 \conditions !defined(HAVE_LCD_CHARCELLS)
1066 \param src
1067 \param src_x
1068 \param src_y
1069 \param stride
1070 \param x
1071 \param y
1072 \param width
1073 \param height
1074 \description
1075
1076void lcd_putc(int x, int y, unsigned long ucs)
1077 \group lcd
1078 \conditions (defined(HAVE_LCD_CHARCELLS))
1079 \param x
1080 \param y
1081 \param ucs
1082 \description Put character =ucs= at coordinates (=x=, =y=)
1083
1084void lcd_puts(int x, int y, const unsigned char *string)
1085 \group lcd
1086 \param x Row X
1087 \param y Column Y
1088 \param string
1089 \description Puts string on the LCD at row =x= and column =y=
1090
1091void lcd_putsxy(int x, int y, const unsigned char *string)
1092 \group lcd
1093 \param x X coordinate
1094 \param y Y coordinate
1095 \param string
1096 \description Puts string on the LCD at position (=x=, =y=)
1097
1098void lcd_puts_scroll(int x, int y, const unsigned char* string)
1099 \group lcd
1100 \param x Row X
1101 \param y Column Y
1102 \param string
1103 \description Puts scrolling string on the LCD at row =x= and column =y=. The scrolling style is STYLE_DEFAULT.
1104
1105void lcd_puts_scroll_style(int x, int y, const unsigned char* string, int style)
1106 \group lcd
1107 \conditions !defined(HAVE_LCD_CHARCELLS)
1108 \param x
1109 \param y
1110 \param string
1111 \param style
1112 \description Same as lcd_puts_style, but with scrolling is enabled
1113 \see lcd_puts_style
1114
1115void lcd_puts_style(int x, int y, const unsigned char *str, int style)
1116 \group lcd
1117 \conditions !defined(HAVE_LCD_CHARCELLS)
1118 \param x Row X
1119 \param y Column Y
1120 \param str
1121 \param style can be STYLE_DEFAULT for black text display or STYLE_INVERT for white text display
1122 \description Put a string at row =x= and column =y=
1123
1124void lcd_put_cursor(int x, int y, unsigned long ucs)
1125 \group lcd
1126 \conditions (defined(HAVE_LCD_CHARCELLS))
1127 \param x
1128 \param y
1129 \param ucs
1130 \description Put cursor at coordinates (=x=, =y=)
1131 \see [S[firmware/export/lcd.h]]
1132
1133void lcd_remote_bitmap(const fb_remote_data *src, int x, int y, int width, int height)
1134 \conditions (defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1))
1135 \param src
1136 \param x
1137 \param y
1138 \param width
1139 \param height
1140 \description
1141
1142void lcd_remote_bitmap_part(const fb_remote_data *src, int src_x, int src_y, int stride, int x, int y, int width, int height)
1143 \conditions (defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1))
1144 \param src
1145 \param src_x
1146 \param src_y
1147 \param stride
1148 \param x
1149 \param y
1150 \param width
1151 \param height
1152 \description
1153
1154void lcd_remote_clear_display(void)
1155 \group remote lcd
1156 \conditions (defined(HAVE_REMOTE_LCD))
1157 \description
1158
1159void lcd_remote_drawline(int x1, int y1, int x2, int y2)
1160 \group remote lcd
1161 \conditions (defined(HAVE_REMOTE_LCD))
1162 \param x1 X top coordinate
1163 \param y1 Y top coordinate
1164 \param x2 X bottom coordinate
1165 \param y2 Y bottom coordinate
1166 \description Draws a line at (=x1=, =y1=) -> (=x2=, =y2=) within current drawing mode
1167
1168void lcd_remote_drawpixel(int x, int y)
1169 \group remote lcd
1170 \conditions (defined(HAVE_REMOTE_LCD))
1171 \param x
1172 \param y
1173 \description Draws a pixel at (=x=, =y=) within current drawing mode
1174
1175void lcd_remote_drawrect(int x, int y, int nx, int ny)
1176 \group remote lcd
1177 \conditions (defined(HAVE_REMOTE_LCD))
1178 \param x
1179 \param y
1180 \param nx
1181 \param ny
1182 \description
1183
1184void lcd_remote_fillrect(int x, int y, int nx, int ny)
1185 \group remote lcd
1186 \conditions (defined(HAVE_REMOTE_LCD))
1187 \param x
1188 \param y
1189 \param nx
1190 \param ny
1191 \description
1192
1193fb_remote_data* lcd_remote_framebuffer
1194 \group remote lcd
1195 \conditions (defined(HAVE_REMOTE_LCD))
1196 \return
1197 \description
1198
1199int lcd_remote_getstringsize(const unsigned char *str, int *w, int *h)
1200 \group remote lcd
1201 \conditions (defined(HAVE_REMOTE_LCD))
1202 \param str String
1203 \param w Width
1204 \param h Height
1205 \return Success or not
1206 \description Stores the width and height of the string in =w= and =h=
1207
1208unsigned lcd_remote_get_background(void)
1209 \conditions (defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1))
1210 \return
1211 \description
1212
1213int lcd_remote_get_drawmode(void)
1214 \group remote lcd
1215 \conditions (defined(HAVE_REMOTE_LCD))
1216 \return
1217 \description
1218
1219unsigned lcd_remote_get_foreground(void)
1220 \conditions (defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1))
1221 \return
1222 \description
1223
1224void lcd_remote_hline(int x1, int x2, int y)
1225 \group remote lcd
1226 \conditions (defined(HAVE_REMOTE_LCD))
1227 \param x1
1228 \param x2
1229 \param y
1230 \description
1231
1232void lcd_remote_mono_bitmap(const unsigned char *src, int x, int y, int width, int height)
1233 \group remote lcd
1234 \conditions (defined(HAVE_REMOTE_LCD))
1235 \param src
1236 \param x
1237 \param y
1238 \param width
1239 \param height
1240 \description
1241
1242void lcd_remote_mono_bitmap_part(const unsigned char *src, int src_x, int src_y, int stride, int x, int y, int width, int height)
1243 \group remote lcd
1244 \conditions (defined(HAVE_REMOTE_LCD))
1245 \param src
1246 \param src_x
1247 \param src_y
1248 \param stride
1249 \param x
1250 \param y
1251 \param width
1252 \param height
1253 \description
1254
1255void lcd_remote_puts(int x, int y, const unsigned char *string)
1256 \group remote lcd
1257 \conditions (defined(HAVE_REMOTE_LCD))
1258 \param x
1259 \param y
1260 \param string
1261 \description
1262
1263void lcd_remote_putsxy(int x, int y, const unsigned char *string)
1264 \group remote lcd
1265 \conditions (defined(HAVE_REMOTE_LCD))
1266 \param x
1267 \param y
1268 \param string
1269 \description
1270
1271void lcd_remote_puts_scroll(int x, int y, const unsigned char* string)
1272 \group remote lcd
1273 \conditions (defined(HAVE_REMOTE_LCD))
1274 \param x
1275 \param y
1276 \param string
1277 \description
1278
1279void lcd_remote_puts_scroll_style(int x, int y, const unsigned char* string, int style)
1280 \group remote lcd
1281 \conditions (defined(HAVE_REMOTE_LCD))
1282 \param x
1283 \param y
1284 \param string
1285 \param style
1286 \description
1287
1288void lcd_remote_puts_style(int x, int y, const unsigned char *str, int style)
1289 \group remote lcd
1290 \conditions (defined(HAVE_REMOTE_LCD))
1291 \param x
1292 \param y
1293 \param str
1294 \param style
1295 \description
1296
1297void lcd_remote_setfont(int font)
1298 \group remote lcd
1299 \conditions (defined(HAVE_REMOTE_LCD))
1300 \param font
1301 \description Set default font
1302
1303void lcd_remote_set_background(unsigned background)
1304 \conditions (defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1))
1305 \param background
1306 \description
1307
1308void lcd_remote_set_contrast(int x)
1309 \group remote lcd
1310 \conditions (defined(HAVE_REMOTE_LCD))
1311 \param x
1312 \description
1313
1314void lcd_remote_set_drawmode(int mode)
1315 \group remote lcd
1316 \conditions (defined(HAVE_REMOTE_LCD))
1317 \param mode
1318 \description
1319
1320void lcd_remote_set_foreground(unsigned foreground)
1321 \conditions (defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1))
1322 \param foreground
1323 \description
1324
1325void lcd_remote_stop_scroll(void)
1326 \group remote lcd
1327 \conditions (defined(HAVE_REMOTE_LCD))
1328 \description Stop all scrolling lines on the screen
1329
1330void lcd_remote_update(void)
1331 \group remote lcd
1332 \conditions (defined(HAVE_REMOTE_LCD))
1333 \description
1334
1335void lcd_remote_update_rect(int x, int y, int width, int height)
1336 \group remote lcd
1337 \conditions (defined(HAVE_REMOTE_LCD))
1338 \param x
1339 \param y
1340 \param width
1341 \param height
1342 \description
1343
1344void lcd_remote_vline(int x, int y1, int y2)
1345 \group remote lcd
1346 \conditions (defined(HAVE_REMOTE_LCD))
1347 \param x
1348 \param y1
1349 \param y2
1350 \description
1351
1352void lcd_remove_cursor(void)
1353 \group lcd
1354 \conditions (defined(HAVE_LCD_CHARCELLS))
1355 \description Remove the cursor from the screen
1356
1357void lcd_setfont(int font)
1358 \group lcd
1359 \conditions !defined(HAVE_LCD_CHARCELLS)
1360 \param font
1361 \description Set default font
1362
1363void lcd_set_backdrop(fb_data* backdrop)
1364 \group lcd
1365 \conditions !defined(HAVE_LCD_CHARCELLS) && (LCD_DEPTH > 1)
1366 \param backdrop Pointer to backdrop image
1367 \description Set the backdrop to =backdrop=
1368 \see lcd_framebuffer
1369
1370void lcd_set_background(unsigned foreground)
1371 \group lcd
1372 \conditions !defined(HAVE_LCD_CHARCELLS) && (LCD_DEPTH > 1)
1373 \param foreground
1374 \description
1375
1376void lcd_set_contrast(int x)
1377 \group lcd
1378 \param x Should be between =MIN_CONTRAST_SETTING= and =MAX_CONTRAST_SETTING=
1379 \description Sets LCD contrast to value =x=
1380
1381void lcd_set_drawmode(int mode)
1382 \group lcd
1383 \conditions !defined(HAVE_LCD_CHARCELLS)
1384 \param mode
1385 \description
1386
1387void lcd_set_foreground(unsigned foreground)
1388 \group lcd
1389 \conditions !defined(HAVE_LCD_CHARCELLS) && (LCD_DEPTH > 1)
1390 \param foreground
1391 \description
1392
1393void lcd_set_invert_display(bool yesno)
1394 \group lcd
1395 \conditions !defined(HAVE_LCD_CHARCELLS) )) && (defined(HAVE_LCD_INVERT
1396 \param yesno
1397 \description
1398
1399void lcd_stop_scroll(void)
1400 \group lcd
1401 \description Stop all scrolling lines on the screen
1402
1403void lcd_unlock_pattern(unsigned long ucs)
1404 \group lcd
1405 \conditions (defined(HAVE_LCD_CHARCELLS))
1406 \param ucs
1407 \description Unlock pattern of index =ucs=
1408
1409void lcd_update(void)
1410 \group lcd
1411 \description Pushes LCD framebuffer changes to the LCD
1412
1413void lcd_update_rect(int x, int y, int width, int height)
1414 \group lcd
1415 \conditions !defined(HAVE_LCD_CHARCELLS)
1416 \param x measured in pixels
1417 \param y measured in pixels
1418 \param width measured in pixels
1419 \param height measured in pixels
1420 \description Pushes LCD framebuffer changes to the LCD within rectangle (=x=, =y=) -> (=x= + =width=, =y= + =height=). Notice that the smallest vertical resolution in updates that the hardware supports is 8 pixels.
1421
1422void lcd_vline(int x, int y1, int y2)
1423 \group lcd
1424 \conditions !defined(HAVE_LCD_CHARCELLS)
1425 \param x X coordinate
1426 \param y1 Y start coordinate
1427 \param y2 Y end coordinate
1428 \description Draws a vertical line at (=x=, =y1=) -> (=x=, =y2=) within current drawing mode
1429
1430void lcd_yuv_set_options(unsigned options)
1431 \group lcd
1432 \conditions !defined(HAVE_LCD_CHARCELLS) )) && (LCD_DEPTH == 16) && (defined(TOSHIBA_GIGABEAT_F) || defined(SANSA_E200) || defined(SANSA_C200) || defined(IRIVER_H10) || defined(COWON_D2
1433 \param options
1434 \description
1435
1436void led(bool on)
1437 \param on
1438 \description
1439
1440void logf(const char *fmt, ...) ATTRIBUTE_PRINTF(1, 2)
1441 \group misc
1442 \conditions (defined(ROCKBOX_HAS_LOGF))
1443 \param fmt
1444 \description
1445
1446const unsigned long *audio_master_sampr_list
1447 \group sound
1448 \conditions (CONFIG_CODEC == SWCODEC)
1449 \return
1450 \description
1451
1452const unsigned long *hw_freq_sampr
1453 \group sound
1454 \conditions (CONFIG_CODEC == SWCODEC)
1455 \return
1456 \description
1457
1458const unsigned long *rec_freq_sampr
1459 \group sound
1460 \conditions (CONFIG_CODEC == SWCODEC) && (defined(HAVE_RECORDING))
1461 \return
1462 \description
1463
1464int mas_codec_readreg(int reg)
1465 \group MAS communication
1466 \conditions (!defined(SIMULATOR) && (CONFIG_CODEC != SWCODEC)) && ((CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F))
1467 \param reg
1468 \return
1469 \description
1470
1471int mas_codec_writereg(int reg, unsigned int val)
1472 \group MAS communication
1473 \conditions (!defined(SIMULATOR) && (CONFIG_CODEC != SWCODEC)) && ((CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F))
1474 \param reg
1475 \param val
1476 \return
1477 \description
1478
1479int mas_readmem(int bank, int addr, unsigned long* dest, int len)
1480 \group MAS communication
1481 \conditions (!defined(SIMULATOR) && (CONFIG_CODEC != SWCODEC))
1482 \param bank
1483 \param addr
1484 \param dest
1485 \param len
1486 \return
1487 \description
1488
1489int mas_readreg(int reg)
1490 \group MAS communication
1491 \conditions (!defined(SIMULATOR) && (CONFIG_CODEC != SWCODEC))
1492 \param reg
1493 \return
1494 \description
1495
1496int mas_writemem(int bank, int addr, const unsigned long* src, int len)
1497 \group MAS communication
1498 \conditions (!defined(SIMULATOR) && (CONFIG_CODEC != SWCODEC))
1499 \param bank
1500 \param addr
1501 \param src
1502 \param len
1503 \return
1504 \description
1505
1506int mas_writereg(int reg, unsigned int val)
1507 \group MAS communication
1508 \conditions (!defined(SIMULATOR) && (CONFIG_CODEC != SWCODEC))
1509 \param reg
1510 \param val
1511 \return
1512 \description
1513
1514void *memchr(const void *s1, int c, size_t n)
1515 \group strings and memory
1516 \param s1
1517 \param c
1518 \param n
1519 \return
1520 \description
1521
1522int memcmp(const void *s1, const void *s2, size_t n)
1523 \group strings and memory
1524 \param s1
1525 \param s2
1526 \param n
1527 \return
1528 \description
1529
1530void* memcpy(void *out, const void *in, size_t n)
1531 \group strings and memory
1532 \param out
1533 \param in
1534 \param n
1535 \return
1536 \description Copies =n= bytes of data in memory from =in= to =out=
1537
1538void* memmove(void *out, const void *in, size_t n)
1539 \group strings and memory
1540 \param out
1541 \param in
1542 \param n
1543 \return
1544 \description
1545
1546void* memset(void *dst, int c, size_t length)
1547 \group strings and memory
1548 \param dst
1549 \param c
1550 \param length
1551 \return
1552 \description Fills a memory region with specified byte value =c=
1553
1554int mkdir(const char *name)
1555 \group dir
1556 \param name
1557 \return
1558 \description
1559
1560time_t mktime(struct tm *t)
1561 \group misc
1562 \conditions (CONFIG_RTC)
1563 \param t
1564 \return
1565 \description
1566
1567bool mp3info(struct mp3entry *entry, const char *filename)
1568 \group misc
1569 \param entry
1570 \param filename
1571 \return FALSE if successfull
1572 \description The given =entry= is filled in with whatever id3 info it could find about the given =filename=
1573
1574bool mp3_is_playing(void)
1575 \group sound
1576 \conditions (!defined(SIMULATOR))
1577 \return true if an mp3 is playing, else return false
1578 \description Note: a paused mp3 is considered as a playing mp3
1579
1580void mp3_play_data(const unsigned char* start, int size, void (*get_more)(unsigned char** start, size_t* size))
1581 \group sound
1582 \conditions (!defined(SIMULATOR))
1583 \param start points to the begining of the file to play
1584 \param size is the size to play
1585 \param get_more is a callback function
1586 \description Plays a chunk of an mp3 file
1587
1588void mp3_play_pause(bool play)
1589 \group sound
1590 \conditions (!defined(SIMULATOR))
1591 \param play
1592 \description If playback was paused and =play= is TRUE, resume playback. If playback isn't paused and =play= is FALSE, pause playback.
1593
1594void mp3_play_stop(void)
1595 \group sound
1596 \conditions (!defined(SIMULATOR))
1597 \description Stops playback
1598
1599unsigned long mpeg_get_last_header(void)
1600 \group playback control
1601 \conditions (!defined(SIMULATOR) && (CONFIG_CODEC != SWCODEC))
1602 \return
1603 \description
1604
1605void mutex_init(struct mutex *m)
1606 \group kernel/ system
1607 \conditions (CONFIG_CODEC == SWCODEC)
1608 \param m
1609 \description
1610
1611void mutex_lock(struct mutex *m)
1612 \group kernel/ system
1613 \conditions (CONFIG_CODEC == SWCODEC)
1614 \param m
1615 \description
1616
1617void mutex_unlock(struct mutex *m)
1618 \group kernel/ system
1619 \conditions (CONFIG_CODEC == SWCODEC)
1620 \param m
1621 \description
1622
1623DIR* opendir(const char* name)
1624 \group dir
1625 \param name
1626 \return a pointer to the directory stream
1627 \description The opendir() function opens a directory stream corresponding to the directory name. The stream is positioned at the first entry in the directory.
1628
1629bool option_screen(const struct settings_list *setting, struct viewport parent[NB_SCREENS], bool use_temp_var, unsigned char* option_title)
1630 \group options
1631 \param setting
1632 \param parent[NB_SCREENS]
1633 \param use_temp_var
1634 \param option_title
1635 \return
1636 \description
1637
1638void pcm_apply_settings(void)
1639 \group sound
1640 \conditions (CONFIG_CODEC == SWCODEC)
1641 \description
1642
1643void pcm_calculate_peaks(int *left, int *right)
1644 \group sound
1645 \conditions (CONFIG_CODEC == SWCODEC)
1646 \param left
1647 \param right
1648 \description
1649
1650void pcm_calculate_rec_peaks(int *left, int *right)
1651 \group sound
1652 \conditions (CONFIG_CODEC == SWCODEC) && (defined(HAVE_RECORDING))
1653 \param left
1654 \param right
1655 \description
1656
1657void pcm_close_recording(void)
1658 \group sound
1659 \conditions (CONFIG_CODEC == SWCODEC) && (defined(HAVE_RECORDING))
1660 \description
1661
1662size_t pcm_get_bytes_waiting(void)
1663 \group sound
1664 \conditions (CONFIG_CODEC == SWCODEC)
1665 \return
1666 \description
1667
1668void pcm_init_recording(void)
1669 \group sound
1670 \conditions (CONFIG_CODEC == SWCODEC) && (defined(HAVE_RECORDING))
1671 \description
1672
1673bool pcm_is_paused(void)
1674 \group sound
1675 \conditions (CONFIG_CODEC == SWCODEC)
1676 \return true if playback is paused, else false
1677 \description
1678
1679bool pcm_is_playing(void)
1680 \group sound
1681 \conditions (CONFIG_CODEC == SWCODEC)
1682 \return true unless playback is paused
1683 \description
1684
1685void pcm_play_data(pcm_more_callback_type get_more, unsigned char* start, size_t size)
1686 \group sound
1687 \conditions (CONFIG_CODEC == SWCODEC)
1688 \param get_more Optional callback
1689 \param start is the address of raw 16-16, interleaved PCM data
1690 \param size is the size of the data to play
1691 \description May be used without the callback parameter in order to play a single clip. If you wish to play sound continuously, then use the callback instead and return the buffer address and size to be played from that callback. Every time that a buffer is played out, the callback is asked for the next buffer to play but without stopping and starting playback. The callback is called asynchronously in interrupt context so what you may do in there is limited.
1692
1693void pcm_play_lock(void)
1694 \group sound
1695 \conditions (CONFIG_CODEC == SWCODEC)
1696 \description
1697
1698void pcm_play_pause(bool play)
1699 \group sound
1700 \conditions (CONFIG_CODEC == SWCODEC)
1701 \param play
1702 \description Pauses or unpauses the playback depending on the truth value of =play=
1703
1704void pcm_play_stop(void)
1705 \group sound
1706 \conditions (CONFIG_CODEC == SWCODEC)
1707 \description Stops the playback and empties the audio buffer unlike [F[pcm_play_pause]]
1708
1709void pcm_play_unlock(void)
1710 \group sound
1711 \conditions (CONFIG_CODEC == SWCODEC)
1712 \description
1713
1714void pcm_record_data(pcm_more_callback_type2 more_ready, void *start, size_t size)
1715 \group sound
1716 \conditions (CONFIG_CODEC == SWCODEC) && (defined(HAVE_RECORDING))
1717 \param more_ready
1718 \param start
1719 \param size
1720 \description
1721
1722void pcm_record_more(void *start, size_t size)
1723 \group sound
1724 \conditions (CONFIG_CODEC == SWCODEC) && (defined(HAVE_RECORDING))
1725 \param start
1726 \param size
1727 \description
1728
1729void pcm_set_frequency(unsigned int frequency)
1730 \group sound
1731 \conditions (CONFIG_CODEC == SWCODEC)
1732 \param frequency
1733 \description
1734
1735void pcm_stop_recording(void)
1736 \group sound
1737 \conditions (CONFIG_CODEC == SWCODEC) && (defined(HAVE_RECORDING))
1738 \description
1739
1740bool peak_meter_get_use_dbfs(void)
1741 \conditions ((CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F))
1742 \return 1 if the meter currently is displaying dBfs values, 0 if the meter is displaying percent values
1743 \description
1744
1745unsigned short peak_meter_scale_value(unsigned short val, int meterwidth)
1746 \conditions ((CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F))
1747 \param val is the volume value (range: 0 <= val < MAX_PEAK)
1748 \param meterwidth is the width of the meter in pixel
1749 \return a value between 0 and meterwidth
1750 \description Scales a peak value as read from the MAS to the range of =meterwidth=. The scaling is performed according to the scaling method (dBfs / linear) and the range (peak_meter_range_min .. peak_meter_range_max).
1751
1752void peak_meter_set_use_dbfs(bool use)
1753 \conditions ((CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F))
1754 \param use If =use= is 0 use linear percent scale, else use dBfs
1755 \description Specifies whether the values displayed are scaled as dBfs or as linear percent values
1756
1757int playlist_amount(void)
1758 \group playback control
1759 \return the number of tracks in current playlist
1760 \description
1761
1762int playlist_resume(void)
1763 \group playback control
1764 \return
1765 \description
1766
1767int playlist_start(int start_index, int offset)
1768 \group playback control
1769 \param start_index
1770 \param offset
1771 \return
1772 \description
1773
1774void* plugin_get_audio_buffer(size_t *buffer_size)
1775 \group misc
1776 \param buffer_size
1777 \return
1778 \description Steals =buffer_size= bytes from the available RAM, reducing the available buffer for audio buffering
1779
1780void* plugin_get_buffer(size_t *buffer_size)
1781 \group misc
1782 \param buffer_size this is the memory size left in plugin buffer upon return
1783 \return a pointer to the portion of the plugin buffer that is not already being used. If no plugin is loaded, returns the entire plugin buffer.
1784 \description
1785
1786char* plugin_get_current_filename(void)
1787 \group misc
1788 \return
1789 \description
1790
1791void plugin_iram_init(char *iramstart, char *iramcopy, size_t iram_size, char *iedata, size_t iedata_size)
1792 \group misc
1793 \conditions (defined(PLUGIN_USE_IRAM))
1794 \param iramstart
1795 \param iramcopy
1796 \param iram_size
1797 \param iedata
1798 \param iedata_size
1799 \description
1800
1801void plugin_tsr(bool (*exit_callback)(bool reenter))
1802 \group misc
1803 \param exit_callback
1804 \description
1805
1806void PREFIX(audio_play)(long offset)
1807 \group playback control
1808 \param audio_play
1809 \param offset
1810 \description
1811
1812int PREFIX(close)(int fd)
1813 \group file
1814 \param close
1815 \param fd
1816 \return 0 upon success
1817 \description The close() function will deallocate the file descriptor indicated by =fd=. To deallocate means to make the file descriptor available for return by subsequent calls to open() or other functions that allocate file descriptors.
1818
1819int PREFIX(creat)(const char *pathname)
1820 \group file
1821 \param creat
1822 \param pathname
1823 \return the file descriptor associated to this file
1824 \description Create a file with mode O_RDONLY, O_WRONLY or O_RDWR
1825
1826off_t PREFIX(filesize)(int fd)
1827 \group file
1828 \param filesize
1829 \param fd
1830 \return size of a file; upon error, returns -1
1831 \description
1832
1833int PREFIX(ftruncate)(int fd, off_t length)
1834 \group file
1835 \param ftruncate
1836 \param fd
1837 \param length
1838 \return
1839 \description Truncate file to the specified =length=
1840
1841off_t PREFIX(lseek)(int fd, off_t offset, int whence)
1842 \group file
1843 \param lseek
1844 \param fd
1845 \param offset
1846 \param whence
1847 \return
1848 \description The lseek() function sets the file pointer associated with the open file descriptor specified by =fd= as follows: If =whence= is SEEK_SET, the pointer is set to =offset= bytes. If =whence= is SEEK_CUR, the pointer is set to its current location plus =offset=. If =whence= is SEEK_END, the pointer is set to the size of the file plus =offset=.
1849
1850int PREFIX(open)(const char* pathname, int flags)
1851 \group file
1852 \param open
1853 \param pathname
1854 \param flags
1855 \return
1856 \description The open() function establishes the connection between a file and a file descriptor. It creates an open file description that refers to a file and a file descriptor that refers to that open file description. The file descriptor is used by other I/O functions to refer to that file.
1857
1858ssize_t PREFIX(read)(int fd, void* buf, size_t count)
1859 \group file
1860 \param read
1861 \param fd
1862 \param buf
1863 \param count
1864 \return
1865 \description The read() function attempts to read =count= bytes from the file associated with the open file descriptor, =fd=, into the buffer pointed to by =buf=
1866
1867int PREFIX(remove)(const char* pathname)
1868 \group file
1869 \param remove
1870 \param pathname
1871 \return
1872 \description remove() deletes a name from the filesystem. It calls unlink for files, and rmdir for directories.
1873
1874int PREFIX(rename)(const char* path, const char* newname)
1875 \group file
1876 \param rename
1877 \param path points to the pathname of the file to be renamed
1878 \param newname points to the new pathname of the file
1879 \return
1880 \description The rename() function changes the name of a file
1881
1882void PREFIX(sleep)(int ticks)
1883 \group kernel/ system
1884 \param sleep
1885 \param ticks
1886 \description Sleep a specified number of =ticks=, we have HZ ticks per second
1887
1888ssize_t PREFIX(write)(int fd, const void* buf, size_t count)
1889 \group file
1890 \param write
1891 \param fd
1892 \param buf
1893 \param count
1894 \return
1895 \description Write writes up to =count= bytes to the file referenced by the file descriptor =fd= from the buffer starting at =buf=
1896
1897void profile_func_enter(void *this_fn, void *call_site)
1898 \conditions (defined(RB_PROFILE))
1899 \param this_fn
1900 \param call_site
1901 \description
1902
1903void profile_func_exit(void *this_fn, void *call_site)
1904 \conditions (defined(RB_PROFILE))
1905 \param this_fn
1906 \param call_site
1907 \description
1908
1909void profile_thread(void)
1910 \conditions (defined(RB_PROFILE))
1911 \description
1912
1913void profstop(void)
1914 \conditions (defined(RB_PROFILE))
1915 \description
1916
1917void qsort(void *base, size_t nmemb, size_t size, int(*compar)(const void *, const void *))
1918 \group misc
1919 \param base start of array
1920 \param nmemb number of elements
1921 \param size describes the size of each element of the array
1922 \param compar
1923 \description qsort sorts an array (begining at =base=) of =nmemb= objects
1924
1925void queue_delete(struct event_queue *q)
1926 \param q
1927 \description
1928
1929bool queue_empty(const struct event_queue *q)
1930 \conditions (CONFIG_CODEC == SWCODEC)
1931 \param q
1932 \return
1933 \description
1934
1935void queue_enable_queue_send(struct event_queue *q, struct queue_sender_list *send, struct thread_entry *owner)
1936 \conditions (CONFIG_CODEC == SWCODEC)
1937 \param q
1938 \param send
1939 \param owner
1940 \description
1941
1942void queue_init(struct event_queue *q, bool register_queue)
1943 \param q
1944 \param register_queue
1945 \description
1946
1947void queue_post(struct event_queue *q, long id, intptr_t data)
1948 \param q
1949 \param id
1950 \param data
1951 \description
1952
1953void queue_reply(struct event_queue *q, intptr_t retval)
1954 \conditions (CONFIG_CODEC == SWCODEC)
1955 \param q
1956 \param retval
1957 \description
1958
1959intptr_t queue_send(struct event_queue *q, long id, intptr_t data)
1960 \conditions (CONFIG_CODEC == SWCODEC)
1961 \param q
1962 \param id
1963 \param data
1964 \return
1965 \description
1966
1967void queue_wait(struct event_queue *q, struct queue_event *ev)
1968 \conditions (CONFIG_CODEC == SWCODEC)
1969 \param q
1970 \param ev
1971 \description
1972
1973void queue_wait_w_tmo(struct event_queue *q, struct queue_event *ev, int ticks)
1974 \param q
1975 \param ev
1976 \param ticks
1977 \description
1978
1979int rand(void)
1980 \group misc
1981 \return a pseudo random number between 0 and 0x7fffffff
1982 \description
1983
1984struct dirent* readdir(DIR* dir)
1985 \group dir
1986 \param dir
1987 \return a pointer to a dirent structure representing the next directory entry in the directory stream pointed to by =dir= or NULL on reaching the end-of-file or if an error occurred
1988 \description
1989
1990int read_bmp_file(const char* filename, struct bitmap *bm, int maxsize, int format)
1991 \conditions (defined(HAVE_LCD_BITMAP))
1992 \param filename
1993 \param bm
1994 \param maxsize
1995 \param format
1996 \return
1997 \description
1998
1999int read_line(int fd, char* buffer, int buffer_size)
2000 \group file
2001 \param fd
2002 \param buffer
2003 \param buffer_size
2004 \return number of bytes read (which may be larger than the number of bytes stored in buffer) or upon error -1 (and buffer contains whatever could be read)
2005 \description Read (up to) a line of text from =fd= into =buffer=. A line is terminated by a LF char. Neither LF nor CR chars are stored in buffer.
2006
2007void register_ata_idle_func(ata_idle_notify function)
2008 \group file
2009 \conditions (USING_ATA_CALLBACK)
2010 \param function
2011 \description
2012
2013void reload_directory(void)
2014 \group file
2015 \description
2016
2017void remote_backlight_off(void)
2018 \conditions (defined(HAVE_REMOTE_LCD))
2019 \description Turns the remote backlight off
2020
2021void remote_backlight_on(void)
2022 \conditions (defined(HAVE_REMOTE_LCD))
2023 \description Turns the remote backlight on
2024
2025void remote_backlight_set_timeout(int index)
2026 \conditions (defined(HAVE_REMOTE_LCD))
2027 \param index
2028 \description
2029
2030void remote_backlight_set_timeout_plugged(int index)
2031 \conditions (defined(HAVE_REMOTE_LCD)) && (CONFIG_CHARGING)
2032 \param index
2033 \description
2034
2035void reset_poweroff_timer(void)
2036 \description The function name pretty much says what it's supposed to do
2037
2038int rmdir(const char *name)
2039 \group dir
2040 \param name
2041 \return
2042 \description
2043
2044struct screen* screens[NB_SCREENS]
2045 \return
2046 \description
2047
2048void screen_clear_area(struct screen * display, int xstart, int ystart, int width, int height)
2049 \conditions !defined(HAVE_LCD_CHARCELLS)
2050 \param display
2051 \param xstart
2052 \param ystart
2053 \param width
2054 \param height
2055 \description
2056
2057void screen_dump_set_hook(void (*hook)(int fh))
2058 \conditions (defined(HAVE_LCD_BITMAP))
2059 \param hook
2060 \description
2061
2062bool search_albumart_files(const struct mp3entry *id3, const char *size_string, char *buf, int buflen)
2063 \conditions (defined(HAVE_ALBUMART))
2064 \param id3
2065 \param size_string
2066 \param buf Pointer to output
2067 \param buflen Max length for =buf=
2068 \return true if an album art was found
2069 \description Searches the the album art file for the given =id3= struct, appending the =size_string= to the search pattern (cover.bmp). It writes the complete path into =buf=, but not more bytes than =buflen=.
2070
2071void semaphore_init(struct semaphore *s, int max, int start)
2072 \conditions (defined(HAVE_SEMAPHORE_OBJECTS))
2073 \param s
2074 \param max
2075 \param start
2076 \description
2077
2078void semaphore_release(struct semaphore *s)
2079 \conditions (defined(HAVE_SEMAPHORE_OBJECTS))
2080 \param s
2081 \description
2082
2083void semaphore_wait(struct semaphore *s)
2084 \conditions (defined(HAVE_SEMAPHORE_OBJECTS))
2085 \param s
2086 \description
2087
2088const struct settings_list* find_setting(const void* variable, int *id)
2089 \group options
2090 \param variable
2091 \param id
2092 \return
2093 \description
2094
2095bool settings_parseline(char* line, char** name, char** value)
2096 \group file
2097 \param line
2098 \param name
2099 \param value
2100 \return false if no valid config entry was found
2101 \description Parse a line from a configuration file. The line format is: 'name: value'. Any whitespace before setting name or value (after ':') is ignored. A # as first non-whitespace character discards the whole line. Function sets pointers to null-terminated setting name and value.
2102
2103bool set_bool(const char* string, const bool* variable )
2104 \group options
2105 \param string
2106 \param variable
2107 \return
2108 \description
2109
2110bool set_bool_options(const char* string, const bool* variable, const char* yes_str, int yes_voice, const char* no_str, int no_voice, void (*function)(bool))
2111 \group options
2112 \param string
2113 \param variable
2114 \param yes_str
2115 \param yes_voice
2116 \param no_str
2117 \param no_voice
2118 \param function
2119 \return
2120 \description
2121
2122bool set_color(struct screen *display, char *title, unsigned *color, unsigned banned_color)
2123 \conditions (defined(HAVE_LCD_COLOR))
2124 \param display
2125 \param title
2126 \param color
2127 \param banned_color
2128 \return
2129 \description
2130
2131void set_current_file(char* path)
2132 \param path
2133 \description
2134
2135void set_dirfilter(int l_dirfilter)
2136 \param l_dirfilter
2137 \description
2138
2139bool set_int(const unsigned char* string, const char* unit, int voice_unit, const int* variable, void (*function)(int), int step, int min, int max, void (*formatter)(char*, size_t, int, const char*) )
2140 \group options
2141 \param string
2142 \param unit
2143 \param voice_unit
2144 \param variable
2145 \param function
2146 \param step
2147 \param min
2148 \param max
2149 \param formatter
2150 \return
2151 \description
2152
2153bool set_option(const char* string, const void* variable, enum optiontype type, const struct opt_items* options, int numoptions, void (*function)(int))
2154 \group options
2155 \param string
2156 \param variable
2157 \param type
2158 \param options
2159 \param numoptions
2160 \param function
2161 \return
2162 \description
2163
2164int set_time(const struct tm *tm)
2165 \group misc
2166 \param tm
2167 \return FALSE upon success
2168 \description Set current time
2169 \see get_time
2170
2171int show_logo(void)
2172 \return
2173 \description
2174
2175void simplelist_info_init(struct simplelist_info *info, char* title, int count, void* data)
2176 \group list
2177 \param info
2178 \param title
2179 \param count
2180 \param data
2181 \description
2182
2183bool simplelist_show_list(struct simplelist_info *info)
2184 \group list
2185 \param info
2186 \return
2187 \description
2188
2189void sim_lcd_ex_init(int shades, unsigned long (*getpixel)(int, int))
2190 \group special simulator hooks
2191 \conditions (defined(SIMULATOR)) && (defined(HAVE_LCD_BITMAP) && LCD_DEPTH < 8)
2192 \param shades
2193 \param getpixel
2194 \description
2195
2196void sim_lcd_ex_update_rect(int x, int y, int width, int height)
2197 \group special simulator hooks
2198 \conditions (defined(SIMULATOR)) && (defined(HAVE_LCD_BITMAP) && LCD_DEPTH < 8)
2199 \param x
2200 \param y
2201 \param width
2202 \param height
2203 \description
2204
2205int snprintf(char *buf, size_t size, const char *fmt, ...) ATTRIBUTE_PRINTF(3, 4)
2206 \group strings and memory
2207 \param buf
2208 \param size
2209 \param fmt
2210 \return the number of characters printed or that would have been printed if the output was truncated (not including the trailing NULL character) upon success
2211 \description Write a formatted string =fmt= in buffer =buf= of size =size= (including the trailing NULL character). These support %c, %s, %d and %x only with the width and zero padding flag only.
2212
2213int sound_default(int setting)
2214 \group sound
2215 \param setting
2216 \return
2217 \description
2218
2219int sound_max(int setting)
2220 \group sound
2221 \param setting
2222 \return
2223 \description
2224
2225int sound_min(int setting)
2226 \group sound
2227 \param setting
2228 \return
2229 \description
2230
2231void sound_set(int setting, int value)
2232 \group sound
2233 \param setting
2234 \param value
2235 \description
2236
2237void sound_set_pitch(int pitch)
2238 \group playback control
2239 \conditions ((CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) || (CONFIG_CODEC == SWCODEC))
2240 \param pitch
2241 \description
2242
2243const char * sound_unit(int setting)
2244 \group sound
2245 \param setting
2246 \return
2247 \description
2248
2249int sound_val2phys(int setting, int value)
2250 \group sound
2251 \param setting
2252 \param value
2253 \return
2254 \description
2255
2256void splash(int ticks, const char *str)
2257 \param ticks
2258 \param str
2259 \description Display a formatted string in a box for =ticks= time. The string is formatted as with the printf function. (there are =HZ= ticks per second)
2260
2261void splashf(int ticks, const char *fmt, ...) ATTRIBUTE_PRINTF(2, 3)
2262 \param ticks
2263 \param fmt
2264 \description
2265
2266void srand(unsigned int seed)
2267 \group misc
2268 \param seed
2269 \description Seed the random number generator
2270
2271struct gui_syncstatusbar *statusbars
2272 \group scroll bar
2273 \return
2274 \description
2275
2276int strcasecmp(const char *, const char *)
2277 \group strings and memory
2278 \param
2279 \param
2280 \return an integer less than, equal to, or greater than zero if s1 is found, respectively, to be less than, to match, or be greater than s2
2281 \description The strcasecmp() function compares the two strings s1 and s2, ignoring the case of the characters
2282
2283char *strcat(char *s1, const char *s2)
2284 \group strings and memory
2285 \param s1
2286 \param s2
2287 \return =s1= concatenated with =s2=
2288 \description Appends =s2= to =s1=, replacing the NULL terminating character of =s1= and returns it
2289
2290char *strchr(const char *s, int c)
2291 \group strings and memory
2292 \param s
2293 \param c
2294 \return
2295 \description
2296
2297int strcmp(const char *, const char *)
2298 \group strings and memory
2299 \param
2300 \param
2301 \return
2302 \description strcmp() compares the string a to string b. If a sorts lexicographically after b, strcmp returns a number greater than zero. If the two strings match, strcmp returns zero. If a sorts lexicographically before b, strcmp returns a number less than zero.
2303
2304char* strcpy(char *dst, const char *src)
2305 \group strings and memory
2306 \param dst
2307 \param src
2308 \return the initial value of =dst=
2309 \description strcpy() copies the string pointed to by =src= (including the terminating null character) to the array pointed to by =dst=
2310
2311size_t strlen(const char *str)
2312 \group strings and memory
2313 \param str
2314 \return the character count
2315 \description The strlen() function works out the length of the string starting at =str= by counting characters until it reaches a null character.
2316
2317int strncasecmp(const char *s1, const char *s2, size_t n)
2318 \group strings and memory
2319 \param s1
2320 \param s2
2321 \param n
2322 \return
2323 \description Like strcasecmp() but only on the first =n= characters
2324 \see strcasecmp
2325
2326int strncmp(const char *, const char *, size_t)
2327 \group strings and memory
2328 \param
2329 \param
2330 \param size_t
2331 \return
2332 \description
2333
2334char* strncpy(char *dst, const char *src, size_t length)
2335 \group strings and memory
2336 \param dst
2337 \param src
2338 \param length
2339 \return the initial value of =dst=
2340 \description strncpy() copies not more than =length= characters from the string pointed to by =src= (including the terminating null character) to the array pointed to by =dst=. If the string pointed to by =src= is shorter than length characters, null characters are appended to the destination array until a total of =length= characters have been written.
2341
2342char * strrchr(const char *s, int c)
2343 \group strings and memory
2344 \param s
2345 \param c
2346 \return a pointer to the located character, or a null pointer if =c= does not occur in string.
2347 \description This function finds the last occurence of =c= (converted to a char) in the string pointed to by string (including the terminating null character)
2348
2349char* strtok_r(char *ptr, const char *sep, char **end)
2350 \group strings and memory
2351 \param ptr
2352 \param sep
2353 \param end
2354 \return
2355 \description
2356
2357int system_memory_guard(int newmode)
2358 \conditions (!defined(SIMULATOR))
2359 \param newmode
2360 \return
2361 \description
2362
2363bool tagcache_get_next(struct tagcache_search *tcs)
2364 \conditions (defined(HAVE_TAGCACHE))
2365 \param tcs
2366 \return
2367 \description
2368
2369long tagcache_get_numeric(const struct tagcache_search *tcs, int tag)
2370 \conditions (defined(HAVE_TAGCACHE))
2371 \param tcs
2372 \param tag
2373 \return
2374 \description
2375
2376bool tagcache_retrieve(struct tagcache_search *tcs, int idxid, int tag, char *buf, long size)
2377 \conditions (defined(HAVE_TAGCACHE))
2378 \param tcs
2379 \param idxid
2380 \param tag
2381 \param buf
2382 \param size
2383 \return
2384 \description
2385
2386bool tagcache_search(struct tagcache_search *tcs, int tag)
2387 \conditions (defined(HAVE_TAGCACHE))
2388 \param tcs
2389 \param tag
2390 \return
2391 \description
2392
2393bool tagcache_search_add_filter(struct tagcache_search *tcs, int tag, int seek)
2394 \conditions (defined(HAVE_TAGCACHE))
2395 \param tcs
2396 \param tag
2397 \param seek
2398 \return
2399 \description
2400
2401void tagcache_search_finish(struct tagcache_search *tcs)
2402 \conditions (defined(HAVE_TAGCACHE))
2403 \param tcs
2404 \description
2405
2406void tagcache_search_set_uniqbuf(struct tagcache_search *tcs, void *buffer, long length)
2407 \conditions (defined(HAVE_TAGCACHE))
2408 \param tcs
2409 \param buffer
2410 \param length
2411 \description
2412
2413void talk_disable(bool disable)
2414 \group misc
2415 \param disable
2416 \description
2417
2418struct thread_entry* threads
2419 \group kernel/ system
2420 \return
2421 \description
2422
2423void thread_exit(void)
2424 \group kernel/ system
2425 \description
2426
2427void thread_thaw(struct thread_entry *thread)
2428 \param thread
2429 \description
2430
2431void thread_wait(struct thread_entry *thread)
2432 \group kernel/ system
2433 \param thread
2434 \description
2435
2436bool timer_register(int reg_prio, void (*unregister_callback)(void), long cycles, void (*timer_callback)(void) IF_COP(, int core))
2437 \param reg_prio
2438 \param unregister_callback
2439 \param cycles
2440 \param core
2441 \param timer_callback
2442 \return
2443 \description
2444
2445bool timer_set_period(long count)
2446 \param count
2447 \return
2448 \description
2449
2450void timer_unregister(void)
2451 \description
2452
2453void touchscreen_set_mode(enum touchscreen_mode)
2454 \group button
2455 \conditions (defined(HAVE_TOUCHSCREEN))
2456 \param touchscreen_mode
2457 \description
2458
2459struct tree_context* tree_get_context(void)
2460 \return
2461 \description
2462
2463void trigger_cpu_boost(void)
2464 \conditions (defined(HAVE_SCHEDULER_BOOSTCTRL))
2465 \description Boosts the CPU for the current thread
2466
2467void unregister_ata_idle_func(ata_idle_notify function, bool run)
2468 \group file
2469 \conditions (USING_ATA_CALLBACK)
2470 \param function
2471 \param run
2472 \description
2473
2474void usb_acknowledge(long id)
2475 \param id
2476 \description
2477
2478bool usb_powered(void)
2479 \group power
2480 \conditions (defined(HAVE_USB_POWER))
2481 \return
2482 \description
2483
2484unsigned char* utf8encode(unsigned long ucs, unsigned char *utf8)
2485 \group unicode stuff
2486 \param ucs
2487 \param utf8
2488 \return
2489 \description
2490
2491unsigned long utf8length(const unsigned char *utf8)
2492 \group unicode stuff
2493 \param utf8
2494 \return
2495 \description
2496
2497int utf8seek(const unsigned char* utf8, int offset)
2498 \group unicode stuff
2499 \param utf8
2500 \param offset
2501 \return
2502 \description
2503
2504unsigned char* utf16BEdecode(const unsigned char *utf16, unsigned char *utf8, int count)
2505 \group unicode stuff
2506 \param utf16
2507 \param utf8
2508 \param count
2509 \return
2510 \description
2511
2512unsigned char* utf16LEdecode(const unsigned char *utf16, unsigned char *utf8, int count)
2513 \group unicode stuff
2514 \param utf16
2515 \param utf8
2516 \param count
2517 \return
2518 \description
2519
2520void viewport_set_defaults(struct viewport *vp, enum screen_type screen)
2521 \param vp
2522 \param screen
2523 \description
2524
2525int vsnprintf(char *buf, int size, const char *fmt, va_list ap)
2526 \group strings and memory
2527 \param buf
2528 \param size
2529 \param fmt
2530 \param ap
2531 \return
2532 \description
2533
2534void wheel_send_events(bool send)
2535 \conditions (defined(HAVE_WHEEL_POSITION))
2536 \param send
2537 \description
2538
2539int wheel_status(void)
2540 \conditions (defined(HAVE_WHEEL_POSITION))
2541 \return
2542 \description
2543
2544void yield(void)
2545 \group kernel/ system
2546 \description Let another thread run. This should be used as soon as you have to "wait" for something or similar, and also if you do anything that takes "a long time". This function is the entire foundation that our "cooperative multitasking" is based on. Use it!
2547 \see [W[RockboxKernel]]
2548
2549# END