view src/ui/atb/ATBPbFS.h @ 287:3dee79757ae4

UI fw: load handheld audio mode on boot We have now reached the point where use of audio mode config files should be considered mandatory. In ACI usage we can tell users that they need to perform an AT@AUL of some appropriate audio mode, but in UI-enabled fw we really need to have the firmware load audio modes on its own, so that correct audio config gets established when the handset or development board runs on its own, without a connected host computer. Once have FC Venus with both main and headset audio channels and headset plug insertion detection, our fw will need to automatically load the handheld mode or the headset mode depending on the plug insertion state. For now we load only the handheld mode, which has been tuned for FC-HDS4 on FC Luna.
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 13 Nov 2021 03:20:57 +0000
parents 67bfe9f274f6
children
line wrap: on
line source

/*********************************************
 * PB_RECS_PER_FILE
 * 
 * Specifies how many records should be stored in
 * each file on the flash.
 *********************************************/
 
#define PB_RECS_PER_FILE			10

/*********************************************
 * PB_xxx_UPPER_LIMIT
 * 
 * The absolute maximum size of various aspects
 * of the records stored on the file system.  Used
 * to keep values read in from file within a 
 * sensible range.
 *********************************************/
 
#define PB_RECORDS_UPPER_LIMIT		500
#define PB_ALPHATAG_UPPER_LIMIT		500
#define PB_NUMBER_UPPER_LIMIT		500
#define PB_EXT_UPPER_LIMIT			500


/**********************************************
 * T_PB_FSDATA	
 * 
 * Internal information for FS
 *********************************************/
 
typedef struct
{
	SHORT records_max;
	SHORT alpha_max;
	SHORT number_max;
	SHORT ext_max;
	SHORT record_size;
	T_FFS_FD info_file;
	SHORT fileID;
	T_FFS_FD file;
}
T_PB_FSDATA;

/**********************************************
 * T_PB_FSINFO
 * 
 * Information about phonebook -
 * e.g. is SIM or FFS selected ?
 *********************************************/
 
typedef struct
{
	UBYTE	type_selected;	/* The current selected phonebook */
	SHORT records_max;
	SHORT alpha_max;
	SHORT number_max;
	SHORT ext_max;
}
T_PB_FSINFO;

/**********************************************
 * LOCAL FUNCTION PROTOTYPES
 *
 *********************************************/
 
void FS_file_GetIndex(SHORT phys_index, SHORT *fileIndex, SHORT *recIndex);
void FS_file_GetName(char *filename, SHORT phonebook_id, SHORT fileIndex);
SHORT FS_file_OpenForRec(SHORT phonebook_id, SHORT phys_index);