misc
This commit is contained in:
parent
6ea2a3bf60
commit
8932dcb624
7
log.c
7
log.c
@ -1,4 +1,5 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#include "log.h"
|
||||
#include "util.h"
|
||||
@ -38,9 +39,15 @@ void LOG(uint32_t tag, const char * filename, int num, const char * fmt, ...)
|
||||
if (tag & tagtable[i].tagn)
|
||||
{
|
||||
printf("[%s] ", tagtable[i].tag);
|
||||
i = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i != 0)
|
||||
{
|
||||
printf("INVALID LOG TAG\n");
|
||||
exit(1);
|
||||
}
|
||||
#ifdef ENABLE_FILE_LOGGING
|
||||
if (tag & TAG_FILENO)
|
||||
{
|
||||
|
19
main.c
19
main.c
@ -22,16 +22,6 @@ static void check_ret(CborError ret)
|
||||
|
||||
int main(int argc, char * argv[])
|
||||
{
|
||||
/*CborError ret;*/
|
||||
/*uint8_t buf[16];*/
|
||||
/*memset(buf,0,sizeof(buf));*/
|
||||
/*CborEncoder encoder;*/
|
||||
/*cbor_encoder_init(&encoder, buf, sizeof(buf), 0);*/
|
||||
/*ret = cbor_encode_int(&encoder, 55);*/
|
||||
/*check_ret(ret);*/
|
||||
|
||||
/*dump_hex(buf,sizeof(buf));*/
|
||||
|
||||
set_logging_mask(
|
||||
TAG_MC |
|
||||
TAG_GA |
|
||||
@ -61,15 +51,6 @@ int main(int argc, char * argv[])
|
||||
|
||||
ctaphid_handle_packet(hidmsg);
|
||||
memset(hidmsg, 0, sizeof(hidmsg));
|
||||
|
||||
/*int i;*/
|
||||
/*for(i = 0; i < res.length; i += 64)*/
|
||||
/*{*/
|
||||
/*memmove(hidmsg, res.data + i, MIN(res.length - i, 64));*/
|
||||
/*usbhid_send(hidmsg);*/
|
||||
/*printf("<< "); dump_hex(hidmsg,sizeof(hidmsg));*/
|
||||
/*}*/
|
||||
/*printf("\n");*/
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user