Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: [AVR-Chat] accessing bits (e.g. of ports)

2005-01-31 by Paul Maddox

Sven

> #define setbit(ADDRESS,BIT) ((ADDRESS) |= (1<<(BIT)))
> #define clrbit(ADDRESS,BIT) ((ADDRESS) &= ~(1<<(BIT)))
> #define chkbit(ADDRESS,BIT) ((ADDRESS) & (1<<(BIT)))
> #define togglebit(ADDRESS,BIT) ((ADDRESS) ^= (1<<(BIT)))

a very neat soloution!

Paul

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.