MacAddress¶
Namespace:
CtrlDS4| Inherits from:Printable
MAC address the controller reports to the host.
Hosts use it to tell controllers apart, so each controller connected to the same host needs its own address.
It can be printed directly, as six hexadecimal bytes separated by colons:
Constructors¶
MacAddress()¶
Builds the address 00:00:00:00:00:00.
MacAddress(uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t)¶
MacAddress(uint8_t byte0, uint8_t byte1, uint8_t byte2, uint8_t byte3, uint8_t byte4, uint8_t byte5)
Builds an address from its bytes, in the order they are printed.
To avoid using the address of a real device, set bit 1 of the first byte (locally administered address). Keep bit 0 cleared, since it marks multicast addresses, which a device can't use.
Parameters
byte0: First byte.byte1: Second byte.byte2: Third byte.byte3: Fourth byte.byte4: Fifth byte.byte5: Last byte.
Fields¶
bytes¶
Bytes of the address, in the order they are printed.
Methods¶
printTo(Print &)¶
Prints the address as six hexadecimal bytes separated by colons.
Parameters
output: Where to print the address (e.g. Serial).
Returns
Number of characters printed.