13.07.2015 Views

ČESKÁ ZEMĚDĚLSKÁ UNIVERZITA V PRAZE

ČESKÁ ZEMĚDĚLSKÁ UNIVERZITA V PRAZE

ČESKÁ ZEMĚDĚLSKÁ UNIVERZITA V PRAZE

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

#ifdef USR#define UCSRA#define UCSRB#endif#if (2 == 0)#defineFC_RS232_RTS_PORT PORTA#defineFC_RS232_RTS_DDR DDRA#endif#if (2 == 1)#defineFC_RS232_RTS_PORT PORTB#defineFC_RS232_RTS_DDR DDRB#endif#if (2 == 2)#defineFC_RS232_RTS_PORT PORTC#defineFC_RS232_RTS_DDR DDRC#endif#if (2 == 3)#defineFC_RS232_RTS_PORT PORTD#defineFC_RS232_RTS_DDR DDRD#endif#if (2 == 0)#defineFC_RS232_CTS_PORT PINA#defineFC_RS232_CTS_DDR DDRA#endif#if (2 == 1)#defineFC_RS232_CTS_PORT PINB#defineFC_RS232_CTS_DDR DDRB#endif#if (2 == 2)#defineFC_RS232_CTS_PORT PINC#defineFC_RS232_CTS_DDR DDRC#endif#if (2 == 3)#defineFC_RS232_CTS_PORT PIND#defineFC_RS232_CTS_DDR DDRD#endifUSRUCR#defineFC_RS232_HARDWARE#endif#if (0 == 1)#define FC_RS232_DEBUG#endif#if (0 == 1)#define FC_RS232_ECHO#endif#definefc_rsSTATUS_LOOP 0#definefc_rsSTATUS_TIMEOUT 1#definefc_rsSTATUS_RXBYTE 2#defineFC_RS232_TXSTA_VAL 4#defineFC_RS232_SPBRG_VAL 129// Dummy function to closethe defines section offvoid RS232_Dummy_Function();void RS232_Dummy_Function(){}static voidFCD_RS2320_SendRS232Char(charnChar){while ((test_bit(UCSRA,UDRE)) == 0);// wait fortx ready#ifdef FC_RS232_HARDWARE//wait until CTS is lowwhile(test_bit(FC_RS232_CTS_PORT,FC_RS232_CTS_PIN));#endif}UDR = nChar;static charFCD_RS2320_ReceiveRS232Char(charnTimeout){04#define FC_RS232_RTS_PIN#define FC_RS232_CTS_PIN#if (0 == 1)char delay1 = 0;char delay2 = 0;char dummy = 0;char retVal = 255;char bWaitForever = 0;char rxStatus =9

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!