-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathrandom_notes.txt
73 lines (57 loc) · 2.66 KB
/
random_notes.txt
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
http://www.nongnu.org/avr-libc/user-manual/FAQ.html#faq_intpromote
"Why does the compiler compile an 8-bit operation that uses bitwise operators into a 16-bit operation in assembly?"
However, in my experiment, nothing has changed. I guess GCC was smart
enough to use 8-bit operations here.
How to setup TWI bit rate generator:
TWBR = 7
TWPS = 0
==> 400kHz @ CPU clock of 12MHz
AVR315: pages 4 and 5
ATmega8 Datasheet: page 171
Converting IAR C code to avr-gcc:
http://www.nongnu.org/avr-libc/user-manual/porting.html
http://www.avrfreaks.net/wiki/index.php/Documentation:AVR_GCC/IarToAvrgcc
http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=411346
Unnamed unions and structs:
http://stackoverflow.com/questions/1972003/how-to-use-anonymous-structs-unions-in-c
http://gcc.gnu.org/onlinedocs/gcc/Unnamed-Fields.html
from "man gcc" (version 4.4.5):
-fms-extensions
Accept some non-standard constructs used in Microsoft header files.
Some cases of unnamed fields in structures and unions are only accepted
with this option.
Anonymous structures and unions are part of C1X standard: http://en.wikipedia.org/wiki/C1X
Using EEPROM on AVR:
http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=38417
http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=68621
HID Report Constraints:
Each top level collection must be an application collection and reports may not
span more than one top level collection.
Page 57/67 of HID1_11.pdf
Reducing the firmware size:
If the firmware size is slightly above the limit, you can save quite a few
bytes easily by shortening the strings from menu.c (at least 200 bytes can
be saved this way).
Also depending on the compiler options, it is possible to inline the
TWI_Transceiver_Busy() function (it's just a simple expression anyway).
But maybe the compiler has already inlined it for you.
In addition, each character from USB_CFG_VENDOR_NAME and
USB_CFG_DEVICE_NAME takes up 2 bytes because is stored in an array of
integers. Reducing the vendor/device names might further shrink the
firmware size a little bit.
Getting the USB HID Report Descriptor:
http://www.slashdev.ca/2010/05/08/get-usb-report-descriptor-with-linux/
Google IO:
http://www.youtube.com/watch?v=ttavBa4giPc
Starting 02:49
He starts using iPod Touch from 04:03
Ends at 04:40
How to link to a specific time:
http://www.mattcutts.com/blog/link-to-youtube-minute-second/
Just add #t=04m03s at the end
Resistor de pull-up da USB:
p. 141 do usb_20.pdf define como 1K5 ± 5%
USBasp usa 2K2.
Eu usei 2K2.
Sobre escrever números como dígitos
http://www.useit.com/alertbox/writing-numbers.html