-
Notifications
You must be signed in to change notification settings - Fork 1
/
cc1111usbdebug.c
47 lines (37 loc) · 1.1 KB
/
cc1111usbdebug.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#include "cc1111usb.h"
/*************************************************************************************************
* debug stuff. slows executions. *
************************************************************************************************/
/* blinks the EP0 SETUP packet in binary on the LED */
void debugEP0Req(u8 *pReq)
{
(void) pReq;
/*
//u8 loop;
for (loop = sizeof(USB_Setup_Header);loop>0; loop--)
{
blink_binary_baby_lsb(*(pReq), 8);
pReq++;
}*/
}
/* sends a debug message up to the python code to be spit out on stderr */
void debug(__code u8* text)
{
u16 len = 0;
__code u8* ptr = text;
while (*ptr++ != 0)
len ++;
txdata(0xfe, 0xf0, len, (__xdata u8*)text);
}
/*void debughex(u8 num)*/
/*{*/
/*txdata(0xfe, DEBUG_CMD_HEX, 1, (__xdata u8*)&num);*/
/*}*/
/*void debughex16(u16 num)*/
/*{*/
/*txdata(0xfe, DEBUG_CMD_HEX16, 2, (__xdata u8*)&num);*/
/*}*/
/*void debughex32(u32 num)*/
/*{*/
/*txdata(0xfe, DEBUG_CMD_HEX32, 4, (__xdata u8*)&num);*/
/*}*/