B-10
K
A
DAK
AMX 68000 Target Guide
cjcfin8 cjcfin8cjcfin16 cjcfin16cjcfin32 cjcfin32Purpose Read an 8, 16 or 32-Bit Input Port
Used by n Task n ISP n Timer Procedure n Restart Procedure n Exit Procedure
Setup Prototype in file
CJZZZTF.H or macro in file
CJZZZCC.H.
#include "CJZZZ.H"
CJ_T8 CJ_CCPP cjcfin8(void *port);
CJ_T16 CJ_CCPP cjcfin16(void *port);
CJ_T32 CJ_CCPP cjcfin32(void *port);
Description port is the address of an 8, 16 or 32-bit memory-mapped device input
port.
Interrupts o Disabled o Enabled o Restored
Returns Cjcfin8 returns an 8-bit signed value.
Cjcfin16 returns a 16-bit signed value.
Cjcfin32 returns a 32-bit signed value.
Example #include "CJZZZ.H"
/* Console status register */
#define CONSTAT ((CJ_T8 *)0xFFFA002DL)
/* Console data register */
#define CONDATA ((CJ_T8 *)0xFFFA002FL)
void CJ_CCPP conout(char ch) {
/* Wait for ready */
while ( (cjcfin8(CONSTAT) & 0x80) == 0 )
;
/* Write character */
cjcfout8(CONDATA, (CJ_T32)ch);
}
See Also cjcfout8, cjcfout16, cjcfout32