Changeset f51aacc in avrstuff for test_2313_muserial/main.c


Ignore:
Timestamp:
Jul 29, 2014, 7:58:35 PM (10 years ago)
Author:
Adrien Destugues <pulkomandy@…>
Branches:
main
Children:
0db7c37
Parents:
b83dc2a
Message:

Convert muserial test to common.mk.

git-svn-id: svn://pulkomandy.tk/avrstuff@104 c6672c3c-f6b6-47f9-9001-1fd6b12fecbe

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test_2313_muserial/main.c

    rb83dc2a rf51aacc  
    88#include <stdbool.h>
    99
     10// muSerial: ATTiny2313 - LED = PD6
     11// K4KUSB: ATTiny2313 - LED = PB2
     12#define DDRLED DDRB
     13#define PORTLED PORTB
     14#define LEDBIT 1 << PB2
     15
    1016int main() {
    1117        wdt_enable(WDTO_2S);
     
    1521
    1622        //debug LED - output
    17         DDRD |= 255;
     23        DDRLED |= 255;
    1824
    19         PORTD = 0;
     25        PORTLED = 0;
    2026
    2127        // Serial PORT
     
    2430
    2531        UCSRB = (1<<RXEN) |(1<<TXEN);
    26         UCSRC = (1 << UCSZ1) | (1 << UCSZ0); 
     32        UCSRC = (1 << UCSZ1) | (1 << UCSZ0);
    2733
    2834        while(1) {
     
    3339                if (TIFR & (1 << TOV0)) {
    3440                        TIFR = (1 << TOV0); // reset flag
    35                         PORTD ^= (1<<PD6);
     41                        PORTLED ^= LEDBIT;
    3642
    3743                        UDR = 'H';
Note: See TracChangeset for help on using the changeset viewer.