Wire master – Maxim Integrated High-Speed Microcontroller Users Guide: Network Microcontroller Supplement User Manual

Page 209

Advertising
background image

High-Speed Microcontroller User’s

Guide: Network Microcontroller

Supplement

209

rom_task_switch_out

The

rom_task_switch_out function is called before a task is suspended (either voluntarily because it waits for an event or because its

timeslice is over). The DS80C400 silicon software implementation of this function saves the task’s state (stack and SFRs) to the state

buffer. This function is exported by the DS80C400 silicon software, and also serves as the default

taskswitchout in the function redi-

rect table.

Note: It returns ACC ! = 0. The rom_task_switch_in function returns to the caller of this function with ACC = 0. The para-

meters passed to

rom_task_switch_in are defined as follows.

1-WIRE MASTER

OWM_First

The

OWM_First function searches for the first 1-Wire device on the network and, if found, places the 8-byte unique ROM ID in the

OWM_ROMID buffer. A pointer to the OWM_ROMID buffer is provided in the ROM export table.

OWM_Next

The

OWM_Next function searches for the next 1-Wire device on the network based upon the last known search ROM discrepancy and,

if found, places the 8-byte unique ROM ID in the

OWM_ROMID buffer. A pointer to the OWM_ROMID buffer is provided in the ROM

export table.

OWM_Reset

The

OWM_Reset function performs a 1-Wire reset on the network and returns device presence and line-short conditions.

OWM_Byte

The

OWM_Byte function performs eight 1-Wire bit timeslots on the network and returns the response.

OWM_ROMID

OWM_ROMID is a memory buffer where 8-byte address (unique ROM ID) is stored after successful OWM_First or OWM_Next func-
tion call. A pointer to the

OWM_ROMID buffer is provided in the ROM export table. The 8-byte returned address is stored as follows:

@OWM_ROMID+0:

Family Code

@OWM_ROMID+1:

LSByte of 6-byte serial number

@OWM_ROMID+2:

LSByte+1 of 6-byte serial number

@OWM_ROMID+3:

LSByte+2 of 6-byte serial number

@OWM_ROMID+4:

LSByte+3 of 6-byte serial number

@OWM_ROMID+5:

LSByte+4 of 6-byte serial number

@OWM_ROMID+6:

MSByte of 6-byte serial number

@OWM_ROMID+7:

CRC

INPUT

DESCRIPTION

OUTPUT

DESCRIPTION

ACC

byte to transmit

ACC

byte received

INPUT

DESCRIPTION

OUTPUT

DESCRIPTION

ACC

line shorted (=00h)

presence detected (=01h)

no presence detected (=03h)

INPUT

DESCRIPTION

OUTPUT

DESCRIPTION

ACC

next device found (=01h)

otherwise (=00h)

INPUT

DESCRIPTION

OUTPUT

DESCRIPTION

ACC

device found (=01h)

otherwise (=00h)

INPUT

DESCRIPTION

OUTPUT

DESCRIPTION

DPTR0

TCB of task to be switched in

User-defined

Maxim Integrated

Advertising