#include "config.h" /* system configuration */ #include "include/mp3_drv.h" /* mp3 driver definition */ void mp3_init (void) { /* - MP3_CRC_SKIP in config.h define as: TRUE: to skip frames with CRC errors FALSE: to play frame with CRC errors */ #if MP3_CRC_SKIP == TRUE Mp3_skip_crc_error(); /* skip frames with crc error */ #else Mp3_play_crc_error(); /* play frames with crc error */ #endif Mp3_enable(); /* MP3 enable */ Mp3_enable_req(); Mp3_enable_int(); mp3_set_prio(3); } void mp3_set_prio (Byte priority) { if ((priority == 1) || (priority == 3)) /* set LSB priority bit */ { IPL0 |= MSK_EMP3; } if ((priority == 2) || (priority == 3)) /* set MSB priority bit */ { IPH0 |= MSK_EMP3; } } void mp3_stop (void) { Mp3_disable_int(); /* disable MP3 IT */ Mp3_disable(); /* disable decoding */ Mp3_ack_int(); /* clear pending interrupt */ } void mp3_restart (void) { Mp3_disable(); Mp3_enable(); }