This is an old revision of the document!


Viikude operatsioonid

Järgnevalt on demonstreeritud “pin.h” faili kasutamist mis lihtsustab AVR-i tavaliste sisend-väljund viikude kasutamist.

Näidis

#include <avr/io.h>
#include "pin.h"
 
#define LED1 PORTPIN(C, 1)
 
int main(void)
{
	unsigned char x;
 
	pin_setup_output(LED1);
	pin_set(LED1);
	pin_clear(LED1);
	pin_set_to(LED1, 1);
	pin_toggle(LED1);
 
	pin_get_value(LED1, x);
}
et/examples/digi/pin.1239643821.txt.gz · Last modified: (external edit)
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0