00001 /*This file has been prepared for Doxygen automatic documentation generation.*/ 00019 /* Copyright (c) 2009 Atmel Corporation. All rights reserved. 00020 * 00021 * Redistribution and use in source and binary forms, with or without 00022 * modification, are permitted provided that the following conditions are met: 00023 * 00024 * 1. Redistributions of source code must retain the above copyright notice, this 00025 * list of conditions and the following disclaimer. 00026 * 00027 * 2. Redistributions in binary form must reproduce the above copyright notice, 00028 * this list of conditions and the following disclaimer in the documentation 00029 * and/or other materials provided with the distribution. 00030 * 00031 * 3. The name of Atmel may not be used to endorse or promote products derived 00032 * from this software without specific prior written permission. 00033 * 00034 * 4. This software may only be redistributed and used in connection with an Atmel 00035 * AVR product. 00036 * 00037 * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 00038 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 00039 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 00040 * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 00041 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 00042 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 00043 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 00044 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00045 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00046 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE 00047 * 00048 */ 00049 00050 #ifndef _NAVAUTO_H_ 00051 #define _NAVAUTO_H_ 00052 00053 #include "fs_com.h" 00054 #include "fat.h" 00055 #include "navigation.h" 00056 #include "play_list.h" 00057 00059 typedef U8 Navauto_mode; 00060 00063 #define NAVAUTO_MODE_DISKS 0 00064 #define NAVAUTO_MODE_DISK 1 00065 #define NAVAUTO_MODE_DIRONLY 2 00066 #define NAVAUTO_MODE_DIRSUB 3 00067 #define NAVAUTO_MODE_NB 4 00069 00071 typedef U8 Navauto_rand; 00072 00075 #define NAVAUTO_RAND_OFF 0 00076 #define NAVAUTO_RAND_ON 1 00078 00079 typedef union 00080 { 00081 U8 all; 00082 struct 00083 { 00084 U8 : 7; 00085 U8 folder_change : 1; 00086 }; 00087 } Navauto_mov_bitfield_status; 00088 00090 typedef struct 00091 { 00092 U8 status; 00093 Navauto_mov_bitfield_status bitfield; 00094 } Navauto_mov_state; 00095 00096 00099 #define NAVAUTO_MOV_OK 0 00100 #define NAVAUTO_MOV_OK_LOOP 1 00101 #define NAVAUTO_MOV_EMPTY 2 00102 #define NAVAUTO_MOV_DISKNOPRESENT 3 00103 #define NAVAUTO_MOV_DISKERROR 4 00105 00106 Navauto_mode navauto_getmode ( void ); 00107 Bool navauto_setmode ( Navauto_mode exp_mode ); 00108 Navauto_rand navauto_getrand ( void ); 00109 void navauto_setrand ( Navauto_rand rand ); 00110 void navauto_init ( const FS_STRING sz_filterext ); 00111 Bool navauto_open ( Bool b_playlist , U16 pos ); 00112 U16 navauto_close ( void ); 00113 U16 navauto_getnb ( void ); 00114 U16 navauto_getpos ( void ); 00115 Bool navauto_setpos ( U16 u16_pos ); 00116 typedef enum 00117 { 00118 NAVAUTO_MOV_OPTS_NONE = 0, 00119 NAVAUTO_MOV_OPTS_STAY_CURRENT_DIR = 1 00120 } navauto_mov_options_t; 00121 Navauto_mov_state navauto_mov ( Bool b_direction, navauto_mov_options_t options ); 00122 00123 #endif // _NAVAUTO_H_