MAKEADDR(3)
β¨ 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 π
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
- ubuntu stonking: libgpib-doc 4.3.7-6 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms