Yahoo Groups archive

AVR-Chat

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

Thread

re: Assembler notation

re: Assembler notation

2004-02-04 by Lauer, Thilo

> What I would like to do, is define a port with
> names for all the bits, and to use those names
> everywhere.

> I'd really like to be able to define "latch" as  6 and 1<<6...

Well, this is what i learned from the coding style within our
engineering groups:

use a V_ prefix to name the VALUE of a given bit
use a M_ prefix to name the MASK  of a given bit

i.e.
V_Latch = 6
M_Latch = (1<<V_Latch)

To use this convention, you only have to remember the V_/M_ stuff and
where to use what, then simply append your symbol name.

-- Thilo

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.