Hirdetés
- Silent Hill 2 Remake - Középpontban a PS5-ös kiadás
- SWORD ART ONLINE Fractured Daydream - Elindult a nyílt teszt
- Hosszabb előzetesen a Tomb Raider animációs sorozat
- Jövő év elején jön a most bejelentett Like A Dragon: Pirate Yakuza in Hawaii
- Rövid teaser trailert kapott a Splinter Cell animációs sorozat
-
GAMEPOD.hu
Arduino hardverrel és szoftverrel foglakozó téma. Minden mikrovezérlő ami arduinoval programozható, és minden arduino program, board, és hardverrel kapcsolatos kérdések helye.
Új hozzászólás Aktív témák
-
Janos250
őstag
válasz gyapo11 #3366 üzenetére
"én pl. még nem láttam azt a kódot, ami akkor fog lefutni, amikor ezt a sort hajtja végre és küldi ki a soros portra a byte-okat"
Tessék:
size_t HardwareSerial::write(uint8_t c)
{
_written = true;
// If the buffer and the data register is empty, just write the byte
// to the data register and be done. This shortcut helps
// significantly improve the effective datarate at high (>
// 500kbit/s) bitrates, where interrupt overhead becomes a slowdown.
if (_tx_buffer_head == _tx_buffer_tail && bit_is_set(*_ucsra, UDRE0)) {
*_udr = c;
sbi(*_ucsra, TXC0);
return 1;
}
tx_buffer_index_t i = (_tx_buffer_head + 1) % SERIAL_TX_BUFFER_SIZE;// If the output buffer is full, there's nothing for it other than to
// wait for the interrupt handler to empty it a bit
while (i == _tx_buffer_tail) {
if (bit_is_clear(SREG, SREG_I)) {
// Interrupts are disabled, so we'll have to poll the data
// register empty flag ourselves. If it is set, pretend an
// interrupt has happened and call the handler to free up
// space for us.
if(bit_is_set(*_ucsra, UDRE0))
_tx_udr_empty_irq();
} else {
// nop, the interrupt handler will free up space for us
}
}_tx_buffer[_tx_buffer_head] = c;
_tx_buffer_head = i;sbi(*_ucsrb, UDRIE0);
return 1;
}Nem gondolom, hogy az Arduinot használók között túl sokan vannak, akik az assembly kódot akarják bogarászni. Aki mégis, az meg azt is tudja, hogyan kell a fordítót paraméterezni, hogy legyen egy közbülső assembly kódod is.
Az amerikaiak $ milliókért fejlesztettek golyóstollat űrbéli használatra. Az oroszok ceruzát használnak. Én meg arduinot.
Új hozzászólás Aktív témák
- Objektívek topikja
- Kertészet, mezőgazdaság topik
- Gumi és felni topik
- MultiCooker avagy az elektromos kukta. Ötletek, tippek, tanácsok, receptek.
- Elemlámpa, zseblámpa
- NOTEBOOK / NETBOOK / Mac beárazás
- CMF Phone 1 - egy jó telefon
- A gépház modding sötét oldala.
- Motoros topic
- Gaming notebook topik
- További aktív témák...
Állásajánlatok
Cég: Ozeki Kft
Város: Debrecen
Cég: Ozeki Kft
Város: Debrecen