beautypg.com

Sfr_write(), E 62) – Maxim Integrated 73S12xxF Software User Manual

Page 62

background image

73S12xxF Software User Guide

UG_12xxF_016

62

Rev. 1.50

Synopsis

SFR_RC SFR_Read ( IN char cSFRAddr, OUT char *pcSFRValue );


Parameters

cSFRAddr: Input parameter
Specifies the address of the Special Function Register to be read.

pcSFRValue: Output parameter
Specifies the value read from the specified Special Function Register.


Return Codes SFR_OK

Successful read from the SFR.

SFR_INVALID Invalid SFR referenced.

SFR_Write()

Purpose

Write to the specified Special Function Register.


Synopsis

SFR_RC SFR_Write ( IN char cSFRAddr, IN char cSFR, IN char cSFROperation );

Parameters

cSFRAddr: Input parameter
Specifies the address of the Special Function Register to be written.

cSFR: Input parameter
Specifies the value to use to either set, clear or assign bits of the Special Function
Register specified.

cSFROperation: Input parameter
Specifies the operation to perform on the Special Function Register with the value
supplied. Possible values are:

ASSIGN_SFR 0
AND_SFR

1

OR_SFR

2


Return Codes SFR_OK

Successful write to the SFR.

SFR_INVALID Invalid or forbidden SFR referenced.


To set specific bits of the SFR, OR them with ‘1’s. To clear specific bits of the SFR AND them with ‘0’s.