Functions
ONET_Initialize
u8 ONET_Initialize()

ObsoNET searching routine.  /!\ Must not be call from page 1.  /!\ Must not be call before any other function from this module.

ONET_GetSlot
inline u8 ONET_GetSlot()

Obtains the ObsoNET slot (or 0xFF is not found).

Return

Slot number.

ONET_HasBIOS
inline bool ONET_HasBIOS()

Check if ObsoNET card has a BIOS.

Return

TRUE if the card has a BIOS.

ONET_Reset
void ONET_Reset()

Initializes the ObsoNET card.

ONET_GetVersion
inline const u8* ONET_GetVersion()

Obtains the BIOS version.

Return

Pointer to the 3 bytes version number (major, minor, revision).

ONET_GetPhysicalAddr
inline const u8* ONET_GetPhysicalAddr()

Obtains the ObsoNET physical address.

Return

Pointer to the 6 bytes MAC address.

ONET_GetMACAddress
inline const u8* ONET_GetMACAddress()

Obtains the ObsoNET physical address.  See ONET_GetPhysicalAddr

Return

Pointer to the 6 bytes MAC address.

ONET_GetStatus
bool ONET_GetStatus()

Obtains the network connection status.

Return

TRUE if the network is connected.

ONET_Activation
u8 ONET_Activation(
u8 flag
)

Activates or deactivates ObsoNET.

Parameters
flag
u8

Activation flag (ONET_ACTIVATE_GET, ONET_ACTIVATE_ON or ONET_ACTIVATE_OFF).

Return

Current activation state if flag is ONET_ACTIVATE_GET.

ONET_Activate
inline void ONET_Activate()

Activates ObsoNET.

ONET_Disactivate
inline void ONET_Disactivate()

Deactivates ObsoNET.

ONET_IsActivate
inline bool ONET_IsActivate()

Check Activates or deactivates ObsoNET.

Return

TRUE if the card is activated.

ONET_ReceptConfig
u8 ONET_ReceptConfig(
u8 flag
)

Configuration of the reception parameters.

Parameters
flag
u8

Reception flag (ONET_RECEPT_SMALL, ONET_RECEPT_BROADCAST, ONET_RECEPT_MULTICAST, ONET_RECEPT_ALL or ONET_RECEPT_GET).

Return

Current configuration if flag is ONET_RECEPT_GET.

ONET_SetReceptConfig
inline void ONET_SetReceptConfig(
u8 flag
)

Set Configuration of the reception parameters.

Parameters
flag
u8

Reception flag (ONET_RECEPT_SMALL, ONET_RECEPT_BROADCAST, ONET_RECEPT_MULTICAST or ONET_RECEPT_ALL).

ONET_SetReceptConfig

Get Configuration of the reception parameters.

Return

Current configuration.

ONET_SetMulticastMask
void ONET_SetMulticastMask(
u8* addr
)

Set Configuration of the multicast mask.

Parameters
addr
u8*

Address to write the mask to.

ONET_GetMulticastMask
void ONET_GetMulticastMask(
u8* addr
)

Get Configuration of the multicast mask.

Parameters
addr
u8*

Address to read the mask from.

ONET_GetPacketInfo
bool ONET_GetPacketInfo(
ONET_PacketInfo* info
)

Obtains information about the oldest received packet.

Parameters
info
ONET_PacketInfo*

Pointer to the packet information structure.

Return

TRUE if a packet is available.

ONET_GetPacket
bool ONET_GetPacket(
u8* addr
)

Obtains the oldest captured incoming packet.

Parameters
addr
u8*

Address where to put the packet (0 to discard it).

Return

TRUE if a packet has been obtained (or discarded).

ONET_DiscardPacket
void ONET_DiscardPacket()

Discard the oldest captured incoming packet.

ONET_SendPacketSync
u8 ONET_SendPacketSync(
const u8* addr,
u16 size
)

Sends a packet to the network (Synchronous execution).

Parameters
addr
const u8*

Address of the packet to send.

size
u16

Size of the packet.

Return

Status of the transmission.

ONET_SendPacketAsync
u8 ONET_SendPacketAsync(
const u8* addr,
u16 size
)

Sends a packet to the network (Asynchronous execution).

Parameters
addr
const u8*

Address of the packet to send.

size
u16

Size of the packet.

Return

Status of the transmission.

ONET_GetSendStatus
u8 ONET_GetSendStatus()

Obtains the status of the packet transmission.

Return

Status of the transmission.