Search found 21 matches

by stf92
Sat Jan 18, 2014 7:00 am
Forum: V-USB
Topic: static uchar usbIsReset; /* = 0; USB bus is in reset phase
Replies: 5
Views: 4553

Re: static uchar usbIsReset; /* = 0; USB bus is in reset p

Fantastic! Thanks cpldcpu.
by stf92
Sat Jan 18, 2014 4:08 am
Forum: V-USB
Topic: static uchar usbIsReset; /* = 0; USB bus is in reset phase
Replies: 5
Views: 4553

Re: static uchar usbIsReset; /* = 0; USB bus is in reset p

The why: For a program running from the ROM of a microcontroller there likely is no loader, and the task of zeroing BSS would fall to the program's runtime startup routine (crt0 in the old days). According to the avr-libc manual, you have the option of placing uninitialized variables in the .bss sec...
by stf92
Fri Jan 17, 2014 7:25 am
Forum: V-USB
Topic: static uchar usbIsReset; /* = 0; USB bus is in reset phase
Replies: 5
Views: 4553

Re: static uchar usbIsReset; /* = 0; USB bus is in reset p

I couldn't find that variable in several of the 2008 versions. From the comment, it looks more like it's just trying to emphasize that static objects in C are initialized to 0 if no initializer is present. In other versions there's a local static for calling a user-defined reset handler only once, ...
by stf92
Wed Jan 15, 2014 12:03 pm
Forum: V-USB
Topic: Does usbPoll() get executed before entry to the ISR?
Replies: 10
Views: 7148

Re: Does usbPoll() get executed before entry to the ISR?

Can the Attiny 85 do 12 MHz at 3.3V? I am certain this is out of spec. This is Yoshiyasu Takefuji's project, published in Circuit Cellar in issue no.213, year 2008, using Christian's driver. He arrived at the point (12MHz, 3.3V) by interpolation, I think. Anyway, I would like to draw attention towa...
by stf92
Tue Jan 14, 2014 2:12 pm
Forum: V-USB
Topic: Does usbPoll() get executed before entry to the ISR?
Replies: 10
Views: 7148

Does usbPoll() get executed before entry to the ISR?

Hi: This is part of the main module running on the device (GNU C): int main(void) { DDRB = 0x22; // 0010 0010 PB1=SDA and PB5=SCL are output PORTB = 0x22; //SDA=SCL=1 usbInit(); sei(); for(;;){ // main event loop usbPoll(); } return 0; } At device insertion (attachment), after a certain time the dev...
by stf92
Mon Jan 13, 2014 2:02 pm
Forum: V-USB
Topic: static uchar usbIsReset; /* = 0; USB bus is in reset phase
Replies: 5
Views: 4553

static uchar usbIsReset; /* = 0; USB bus is in reset phase

Hi: This is the declaration of usbIsReset, in usbdrv.c (This is a version from 2008, so perhaps this variable no longer exists): static uchar usbIsReset; /* = 0; USB bus is in reset phase */ I think the comment is wrong. usbIsReset = 0 when out of reset. Am I right? Another question is this: what is...