Hardware description
5.5 Push button macros
To test whether the buttons on or off, you can either use
RC200ButtonRead()
and set
Index
to 0 to
test Button0 or to 1 to test Button1, or you can use one of the
RC200Button*Read()
macros to target
a specific button. If you want to control both buttons at once, use
RC200ButtonReadMask()
.
5.5.1 RC200ButtonRead()
extern macro expr RC200ButtonRead (
Index
);
Parameters:
Index
: Button index, of type
unsigned 1
.
Return value:
Boolean button state, of type
unsigned 1
.
Description:
Reads a value from either of the push buttons. A value of 1 means ON (or
closed), a value of 0 means OFF (or open).
5.5.2 RC200Button*Read() macros
extern macro expr RC200Button0Read ();
extern macro expr RC200Button1Read ();
Parameters:
None.
Return value:
Boolean button state, of type
unsigned 1
.
Description:
Reads a value from push button 0 or 1.
5.5.3 RC200ButtonReadMask()
extern macro expr RC200ButtonReadMask ();
Parameters:
None.
Return value:
Bitmask of button state, of type
unsigned 2
.
Description:
Reads a value from both of the push buttons. The value at bit 0 is the state of
button 0. The value at bit 1 is the state of button 1.
5.6 Seven-segment macros
The seven-segment display macros allow you to write a specific hexadecimal digit to each display, or to
specify which segments are lit up.
SevenSeg0*
macros target the left-hand display on the board and
SevenSeg1*
macros target the right-hand display.
5.6.1 Setting segments
extern macro proc RC200SevenSeg0WriteShape (
Shape
);
extern macro proc RC200SevenSeg1WriteShape (
Shape
);
www.celoxica.com
Page 39
Содержание RC200
Страница 1: ...Platform Developer s Kit RC200 203 Manual ...
Страница 72: ......
Страница 76: ...RC200 203 PSL reference TFT 28 writing data 50 www celoxica com Page 76 ...