I'm getting confused about hardware serial. Specifically, the difference between hserflag and hserinflag.
hserflag: is bit 5 of the flags byte signifying, when set, that a background receive has occured, as per p 228 of the (latest) 2015 manual2:
"Name Special function Command
flag5 hserial background receive has occurred hsersetup"
hserinflag: seems to do the same job: p 97 of the same manual:
"In automatic background mode the hardware serial input is fully automated.
Serial data received by the hardware pin is saved into the scratchpad memory area
as soon as it is received. Upon the hsersetup command the serial pointer
(hserptr) is reset to 0. When a byte is received it is saved to this scratchpad
address, the hserptr variable is incremented and the hserinflag flag is set (must be
cleared by user software). Therefore the value ‘hserptr -1’ indicates the last byte
written, and ‘hserinflag = 1’ indicates a byte has been received (see also the
setintflags command)."
Both seem to be valid keywords.
Could some kind person explain which should I use? and how I would know from the manual which I should use?
hserflag: is bit 5 of the flags byte signifying, when set, that a background receive has occured, as per p 228 of the (latest) 2015 manual2:
"Name Special function Command
flag5 hserial background receive has occurred hsersetup"
hserinflag: seems to do the same job: p 97 of the same manual:
"In automatic background mode the hardware serial input is fully automated.
Serial data received by the hardware pin is saved into the scratchpad memory area
as soon as it is received. Upon the hsersetup command the serial pointer
(hserptr) is reset to 0. When a byte is received it is saved to this scratchpad
address, the hserptr variable is incremented and the hserinflag flag is set (must be
cleared by user software). Therefore the value ‘hserptr -1’ indicates the last byte
written, and ‘hserinflag = 1’ indicates a byte has been received (see also the
setintflags command)."
Both seem to be valid keywords.
Could some kind person explain which should I use? and how I would know from the manual which I should use?