Tftp functions/pointers – Maxim Integrated High-Speed Microcontroller Users Guide: Network Microcontroller Supplement User Manual

Page 204

Advertising
background image

High-Speed Microcontroller User’s

Guide: Network Microcontroller

Supplement

204

dhcp_stop

Description:

void dhcp_stop(void);

The

dhcp_stop function disables the DHCP functionality and kills the DHCP client task.

rom_dhcp_notify

Description:

int rom_dhcp_notify(void)

This function notifies of a DHCP state change and sends the TASK_DHCPSLEEP signal to the task originally called

dhcp_init().

The DS80C400 silicon software exports

rom_dhcp_notify(). The rom_dhcp_notify() function serves as the default

DHCPnotify in the function redirect table. The DHCP client calls

DHCPnotify from the function redirect table when it acquires or

loses an IP.

TFTP FUNCTIONS/POINTERS

TFTP_MSG

The DS80C400 silicon software exports a pointer to the data buffer that is configured by the tftp_first task, the TFTP session

uses the tftp_first tast.

tftp_init

Description:

int tftp_init(void);

The

tftp_init function initializes the TFTP client. It sets up the data structures required for the TFTP client, most importantly the

TFTP_MSG data buffer. This function returns 0 in the accumulator if successful, nonzero otherwise.

tftp_first

Description:

int tftp_first(

char *filename);

/* pointer to filename for TFTP request */

The

tftp_first function requests the first TFTP data block and waits for data. This function requests the file name specified at

*filename from the TFTP server and returns the number of bytes read along with a success/failure indication in the accumula-

tor. If this number is less than 512, the TFTP transfer has ended.

INPUT

DESCRIPTION

OUTPUT

DESCRIPTION

DPTR0

*filename

ACC

R1:R0

Return value (= 0 for success)

#bytes read

Example:

MOV DPTR, #FILENAME

ROMCALL tftp_first

INPUT

DESCRIPTION

OUTPUT

DESCRIPTION

ACC

Return value (= 0 for success)

Example:

ROMCALL tftp_init

INPUT

DESCRIPTION

OUTPUT

DESCRIPTION

ACC

New DHCP state

Example:

ROMCALL

rom_dhcp_notify

INPUT

DESCRIPTION

OUTPUT

DESCRIPTION

Example:

ROMCALL dhcp_stop

Maxim Integrated

Advertising