Example #1
0
/*
 *  ======== SysUart_abort ========
 */
Void SysUart_abort(String str)
{
    if (str != NULL) {
        Char ch;
        
        while ((ch = *str++) != '\0') {
            SysUart_putch(ch);
        }
    }
    flash(Led_RED, FOREVER, FOREVER);
    etx();
}
Example #2
0
/**
 * Print meta information of a file seperated by ASCII control characters
 *
 * output format:\n
 * \code
 *  key\<STX\>value\<ETX\>key\<STX\>value\<ETX\>key...value
 * \endcode
 *
 * @param   file    file name of the file to process
 *
 * @return      void
 * @sideeffects none
 */
void
taggit_list_machine(const char *file)
{
    struct taggit_file f;
    struct taggit_list *lst;

    f = taggit_file_open(file);
    if (f.type == FT_INVALID)
        return;

    lst = list(&f);
    if (lst == NULL) {
        /* fprintf(stderr, "File does not contain valid data: \"%s\"\n", file); */
        /* return; */
		key_val_str("filename", (char*)file);
		etx();
		key_val_str("artist", "");
		etx();
		key_val_str("album", "");
		etx();
		key_val_str("tracknumber", "");
		etx();
		key_val_str("tracktitle", "");
		etx();
		key_val_str("year", "");
		etx();
		key_val_str("genre", "");
		etx();
		key_val_str("comment", "");
		etx();
		return;
    }

    key_val_str("filename", (char*)file);
    etx();
    key_val_str("filetype", lst->filetype);
    etx();
    if (f.type == FT_MPEG) {
        key_val_str("tagtypes", lst->tagtypes);
        etx();
        key_val_str("tagtype", (char*)mp3_id_to_string(lst->tagtype));
        etx();
    }
    key_val_str("artist", lst->artist);
    etx();
    key_val_str("album", lst->album);
    etx();
    key_val_int("tracknumber", lst->tracknumber);
    etx();
    key_val_str("tracktitle", lst->tracktitle);
    etx();
    key_val_int("year", lst->year);
    etx();
    key_val_str("genre", lst->genre);
    etx();
    key_val_str("comment", lst->comment);
    etx();
    if (lst->is_va) {
        key_val_str("is_va", "true");
        etx();
        key_val_str("compilation", (char*)lst->va);
    } else {
        key_val_str("is_va", "false");
        etx();
        key_val_str("compilation", "");
    }
    etx();
    key_val_int("bitrate", lst->bitrate);
    etx();
    key_val_int("kbitrate", lst->kbitrate);
    etx();
    key_val_int("samplerate", lst->samplerate);
    etx();
    key_val_dbl("ksamplerate", lst->ksamplerate);
    etx();
    key_val_int("channels", lst->channels);
    etx();
    key_val_int("length", lst->length);
    etx();
    key_val_int("mm:ss", lst->minutes);
    printf(":%d", lst->seconds);

    taglist_destroy(f.type, lst);
    taglib_tag_free_strings();
    taggit_file_destroy(&f);
    free(lst);
}
Example #3
0
/*
 *  ======== SysUart_exit ========
 */
Void SysUart_exit(Int stat)
{
    flash(Led_GREEN, FOREVER, FOREVER);
    etx();
}