3131#include "peripheral/eth/plib_eth.h"
3232
3333static uint8_t kUIDArray [UID_LENGTH ];
34- static const uint32_t MICROCHIP_OID1 = 0x00001ec0 ;
35- static const uint32_t MICROCHIP_OID2 = 0x00d88039 ;
34+ static const uint32_t MICROCHIP_OUI1 = 0x00001ec0 ;
35+ static const uint32_t MICROCHIP_OUI2 = 0x00d88039 ;
3636
3737inline uint8_t ShiftRight (uint8_t b ) {
3838 return (b >> 4 ) & 0x0f ;
@@ -44,26 +44,26 @@ inline uint8_t ShiftLeft(uint8_t b) {
4444
4545void UIDStore_Init () {
4646 // The UID is derived from the RDM manufacturer ID & the MAC address.
47- // The first 3 bytes of the MAC address is the Microchip OIDs , which are one
47+ // The first 3 bytes of the MAC address is the Microchip OUIs , which are one
4848 // of 00:1E:C0, 00:04:A3 or D8:80:39. The bottom 3 bytes contain the unique
4949 // serial number.
5050 //
5151 // To support more than one responder per device, we set the lower 4 bits of
5252 // the UID to 0 so we have 16 responders per device. These means the complete
5353 // UID takes the form:
5454 // MMMM:XAAAAAA0
55- // Where M is the PLASA manufacturer ID, X is derived from the OID and A is
56- // the values from the MAC address. X is derived from the OID as follows:
55+ // Where M is the PLASA manufacturer ID, X is derived from the OUI and A is
56+ // the values from the MAC address. X is derived from the OUI as follows:
5757 //
5858 // 00:1E:C0 -> 1
5959 // D8:80:39 -> 2
60- uint32_t oid = (PLIB_ETH_StationAddressGet (ETH_ID_0 , 1 ) << 16 ) +
60+ uint32_t oui = (PLIB_ETH_StationAddressGet (ETH_ID_0 , 1 ) << 16 ) +
6161 (PLIB_ETH_StationAddressGet (ETH_ID_0 , 2 ) << 8 ) +
6262 PLIB_ETH_StationAddressGet (ETH_ID_0 , 3 );
6363 uint8_t upper_id = 0 ;
64- if (oid == MICROCHIP_OID1 ) {
64+ if (oui == MICROCHIP_OUI1 ) {
6565 upper_id = 0x10 ;
66- } else if (oid == MICROCHIP_OID2 ) {
66+ } else if (oui == MICROCHIP_OUI2 ) {
6767 upper_id = 0x20 ;
6868 }
6969
@@ -78,7 +78,7 @@ void UIDStore_Init() {
7878 ShiftRight (PLIB_ETH_StationAddressGet (ETH_ID_0 , 6 ));
7979 kUIDArray [5 ] = ShiftLeft (PLIB_ETH_StationAddressGet (ETH_ID_0 , 6 ));
8080 } else {
81- // If we didn't match the OID , default to the NULL UID to make it obvious
81+ // If we didn't match the OUI , default to the NULL UID to make it obvious
8282 // what happened
8383 kUIDArray [0 ] = 0 ;
8484 kUIDArray [1 ] = 0 ;
0 commit comments