ВходНаше всё Теги codebook 无线电组件 Поиск Опросы Закон Суббота
6 июля
180340 Топик полностью
Snaky (05.02.2010 08:44 - 09:14, просмотров: 64) ответил Snaky на Скачал на днях с сайта TI исходники для работы с RFID-ридером под MSP. Автор ShreHarsha Rao. Натуральный г-код. Уж от техаса не ожидал.
вторая часть марлезонского балета:  /* * char phello[20]; * //for testing */ Hello, Harsha! buf[RXTXstate] = FIFO; /* write the recieved bytes to the correct place of the*/ ..of the what?? and "received", not "recieved", btw. do { //... if(*Register == 0xA0) { goto FINISH; } InterruptHandlerReader(&Register[0]); } while((irqPORT & irqPIN) == irqPIN); FINISH: __low_power_mode_off_on_exit(); Have you ever heard about the break command? } } } Yeah, looks nice at least... *Register = (*Register >> 1) & 0x07; /* mask the first 5 bits */ Hmm.. Try again: first 3 or last 5? :> void put_space(void) { kputchar(' '); } /* put_space */ You can do better than that! Specify dedicated functions for each ASCII-character! if(irqPORT & irqPIN) { *Register = IRQStatus; /* IRQ status register address */ *(Register + 1) = IRQMask; //... } else { Register[0] = IRQStatus; Register[1] = IRQMask; //... } No comments... Summing up: Indian cannabis - rocks, TI coders don't. :>
DRC придумали трусы