#include "OEMFeatures.h"

#if defined(FEATURE_ADDRBOOK_RUIM)
#include "msm/bridle_AddrBookRUIM.h"
#include "BRIDLEInit_OEM.h"

#if __ARMCC_VERSION >= 120000
#pragma arm section zidata = "bridle_svc_rw_usr_ro"
#endif
uint32 bridle_addrbookruim_swi = 0;
#if __ARMCC_VERSION >= 120000
#pragma arm section zidata
#endif

static PFNSWIHANDLER gHandlers[BRIDLE_ADDRBOOKRUIM_COUNT];

static uint32 bridle_addrbookruim_swihandler(uint32 swi, uint32 a1, uint32 a2, 
                                           uint32 a3, uint32 a4)
{
   return bridle_generic_swihandler(swi, a1, a2, a3, a4, BRIDLE_ADDRBOOKRUIM_COUNT, gHandlers);
}


int RegisterAddrBookRUIMForSWI(void *po)
{
   gHandlers[BRIDLE_ADDRBOOKRUIM_rex_set_sigs] = unpackbridle_rex_set_sigs;
   gHandlers[BRIDLE_ADDRBOOKRUIM_rex_clr_sigs] = unpackbridle_rex_clr_sigs;
   gHandlers[BRIDLE_ADDRBOOKRUIM_rex_wait] = unpackbridle_rex_wait;
   gHandlers[BRIDLE_ADDRBOOKRUIM_uim_cmd] = unpackbridle_uim_cmd;
   gHandlers[BRIDLE_ADDRBOOKRUIM_nvruim_phbook_ascii_to_bcd] = unpackbridle_nvruim_phbook_ascii_to_bcd;
   gHandlers[BRIDLE_ADDRBOOKRUIM_nvruim_phbook_bcd_to_ascii] = unpackbridle_nvruim_phbook_bcd_to_ascii;
   
   return(bridle_RegisterSubSystem(bridle_addrbookruim_swihandler, &bridle_addrbookruim_swi));
}

#endif // FEATURE_ADDRBOOK_RUIM
