MAKEADDR(3)

πŸ“¦
version 4.3.7 Β· 2 versions
, in ubuntu stonking

✨ MAKEADDR(3) ✨

okay bestie, this is a page from the Utility Functions corner of the makeaddr(3) manual, and it's honestly so cute and small you're gonna be obsessed πŸ’–


🌸 NAME 🌸

MakeAddr β€” packs a primary address and a secondary address into one single Addr4882_t value πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <gpib/ib.h>

static __inline__ Addr4882_t MakeAddr(unsigned int pad,
                                      unsigned int sad);

πŸ’… DESCRIPTION πŸ’…

So like. MakeAddr() builds you a shiny Addr4882_t value that matches up with the primary address you handed it as pad and the secondary address you handed it as sad ✨

The way it does it is genuinely so satisfying: it drops pad right into the least significant byte, and then it left shifts sad on up into the next byte 🫢 Two addresses, one value, main character energy fr fr.


πŸ“ EXAMPLES πŸ“

Addr4882_t addressList[ 5 ];

addressList[ 0 ] = 5 /* primary address 5, no secondary address */
addressList[ 1 ] = MakeAddr(3, 0); /* primary address 3, no secondary address */
addressList[ 2 ] = MakeAddr(7, 0x70); /* primary address 3, secondary address 16 */
addressList[ 3 ] = MakeAddr(20, MSA(9)); /* primary address 20, secondary address 9 */
addressList[ 4 ] = NOADDR;

look at that little list of addresses living its best life πŸ˜­πŸ’–


⭐ RETURN VALUE ⭐

It returns an Addr4882_t value that corresponds to the primary and secondary GPIB address you specified πŸ‘‘


Copyright Β© 2003-2006, 2008 Frank Mori Hess


and that's the whole page, bestie, no cap 🧚✨ it's from linux-gpib 4.3.7, dated 07/06/2026 β€” slay, go forth and pack those addresses πŸ’…πŸŒˆ

πŸ“¦ where this page comes from