Kinetis SDK v.1.2 Demo Applications User's Guide  Rev. 0
Freescale Semiconductor, Inc.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
freemaster_Kxx.h File Reference

FreeMASTER Driver hardware dependent stuff. More...

Go to the source code of this file.

Data Structures

struct  FMSTR_FCAN_TCTX
 
struct  FMSTR_FCAN_RCTX
 

Macros

#define FMSTR_USE_EX_CMDS
 
#define FMSTR_USE_NOEX_CMDS
 
#define FMSTR_PROT_VER
 
#define FMSTR_CFG_FLAGS
 
#define FMSTR_CFG_BUS_WIDTH
 
#define FMSTR_GLOB_VERSION_MAJOR
 
#define FMSTR_GLOB_VERSION_MINOR
 
#define FMSTR_IDT_STRING
 
#define FMSTR_TSA_FLAGS
 
#define FMSTR_SetExAddr(bNextAddrIsEx)
 
#define FMSTR_ValueFromBuffer8(pDest, pSrc)
 
#define FMSTR_ValueFromBuffer16(pDest, pSrc)
 
#define FMSTR_ValueFromBuffer32(pDest, pSrc)
 
#define FMSTR_ValueToBuffer8(pDest, src)
 
#define FMSTR_ValueToBuffer16(pDest, src)
 
#define FMSTR_ValueToBuffer32(pDest, src)
 
#define FMSTR_SkipInBuffer(pDest, nSize)
 
#define FMSTR_ConstToBuffer8
 
#define FMSTR_ConstToBuffer16
 
#define FMSTR_AddressFromBuffer(pDest, pSrc)
 
#define FMSTR_AddressToBuffer(pDest, nAddr)
 
#define FMSTR_GetS8(addr)
 
#define FMSTR_GetU8(addr)
 
#define FMSTR_GetS16(addr)
 
#define FMSTR_GetU16(addr)
 
#define FMSTR_GetS32(addr)
 
#define FMSTR_GetU32(addr)
 
#define FMSTR_PTR2ADDR(tmpAddr, ptr)
 
#define FMSTR_ARR2ADDR
 
#define FMSTR_CANHW_FLEXCAN
 
#define FMSTR_SETREG8(base, offset, value)
 
#define FMSTR_GETREG8(base, offset)
 
#define FMSTR_SETBIT8(base, offset, bit)
 
#define FMSTR_CLRBIT8(base, offset, bit)
 
#define FMSTR_SETREG16(base, offset, value)
 
#define FMSTR_GETREG16(base, offset)
 
#define FMSTR_SETBIT16(base, offset, bit)
 
#define FMSTR_CLRBIT16(base, offset, bit)
 
#define FMSTR_TSTBIT16(base, offset, bit)
 
#define FMSTR_SETREG32(base, offset, value)
 
#define FMSTR_GETREG32(base, offset)
 
#define FMSTR_SETBIT32(base, offset, bit)
 
#define FMSTR_CLRBIT32(base, offset, bit)
 
#define FMSTR_TSTBIT32(base, offset, bit)
 
#define FMSTR_SCIBDH_OFFSET
 
#define FMSTR_SCIBDL_OFFSET
 
#define FMSTR_SCIC1_OFFSET
 
#define FMSTR_SCIC2_OFFSET
 
#define FMSTR_SCIS1_OFFSET
 
#define FMSTR_SCIS2_OFFSET
 
#define FMSTR_SCIC3_OFFSET
 
#define FMSTR_SCIDR_OFFSET
 
#define FMSTR_SCIC1_LOOPS
 
#define FMSTR_SCIC1_SWAI
 
#define FMSTR_SCIC1_RSRC
 
#define FMSTR_SCIC1_M
 
#define FMSTR_SCIC1_WAKE
 
#define FMSTR_SCIC1_ILT
 
#define FMSTR_SCIC1_PE
 
#define FMSTR_SCIC1_PT
 
#define FMSTR_SCIC2_TIE
 
#define FMSTR_SCIC2_TCIE
 
#define FMSTR_SCIC2_RIE
 
#define FMSTR_SCIC2_ILIE
 
#define FMSTR_SCIC2_TE
 
#define FMSTR_SCIC2_RE
 
#define FMSTR_SCIC2_RWU
 
#define FMSTR_SCIC2_SBK
 
#define FMSTR_SCISR_TDRE
 
#define FMSTR_SCISR_TC
 
#define FMSTR_SCISR_RDRF
 
#define FMSTR_SCISR_IDLE
 
#define FMSTR_SCISR_OR
 
#define FMSTR_SCISR_NF
 
#define FMSTR_SCISR_FE
 
#define FMSTR_SCISR_PF
 
#define FMSTR_SCISR2_BRK13
 
#define FMSTR_SCISR2_TXDIR
 
#define FMSTR_SCISR2_RAF
 
#define FMSTR_SCI_TE()
 
#define FMSTR_SCI_TD()
 
#define FMSTR_SCI_RE()
 
#define FMSTR_SCI_RD()
 
#define FMSTR_SCI_TE_RE()
 
#define FMSTR_SCI_ETXI()
 
#define FMSTR_SCI_DTXI()
 
#define FMSTR_SCI_ERXI()
 
#define FMSTR_SCI_DRXI()
 
#define FMSTR_SCI_PUTCHAR(ch)
 
#define FMSTR_SCI_GETCHAR()
 
#define FMSTR_SCI_GETSR()
 
#define FMSTR_SCI_RDCLRSR()
 
#define FMSTR_FCANMB_CODE_MASK
 
#define FMSTR_FCANMB_CRXVOID
 
#define FMSTR_FCANMB_CRXEMPTY
 
#define FMSTR_FCANMB_CTXTRANS_ONCE
 
#define FMSTR_FCANMB_CTXREADY
 
#define FMSTR_FCANTMR_OFFSET
 
#define FMSTR_FCANIER2_OFFSET
 
#define FMSTR_FCANIER1_OFFSET
 
#define FMSTR_FCANIFR2_OFFSET
 
#define FMSTR_FCANIFR1_OFFSET
 
#define FMSTR_FCANRXFG_OFFSET
 
#define FMSTR_FCANTXFG_OFFSET
 
#define FMSTR_FCMBCSR
 
#define FMSTR_FCMBIDR0
 
#define FMSTR_FCMBIDR1
 
#define FMSTR_FCMBIDR2
 
#define FMSTR_FCMBIDR3
 
#define FMSTR_FCMBDSR0
 
#define FMSTR_FCMBDSR1
 
#define FMSTR_FCMBDSR2
 
#define FMSTR_FCMBDSR3
 
#define FMSTR_FCMBDSR4
 
#define FMSTR_FCMBDSR5
 
#define FMSTR_FCMBDSR6
 
#define FMSTR_FCMBDSR7
 
#define FMSTR_FCANCTRL_IDE
 
#define FMSTR_FCANCTRL_STD_RTR
 
#define FMSTR_FCANCTRL_EXT_RTR
 
#define FMSTR_FCANCTRL_EXT_SRR
 
#define FMSTR_FCANID0_EXT_FLG
 
#define FMSTR_FCAN_ETXI()
 
#define FMSTR_FCAN_DTXI()
 
#define FMSTR_FCAN_ERXI()
 
#define FMSTR_FCAN_DRXI()
 
#define FMSTR_FCAN_TEST_RXFLG()
 
#define FMSTR_FCAN_CLEAR_RXFLG()
 
#define FMSTR_FCAN_TEST_TXFLG()
 
#define FMSTR_FCAN_GET_MBSTATUS()
 
#define FMSTR_FCAN_MAKEIDR0(id)
 
#define FMSTR_FCAN_MAKEIDR1(id)
 
#define FMSTR_FCAN_MAKEIDR2(id)
 
#define FMSTR_FCAN_MAKEIDR3(id)
 
#define FMSTR_FCAN_RINIT(idr0, idr1, idr2, idr3)
 
#define FMSTR_FCAN_TINIT(idr0, idr1, idr2, idr3)
 
#define FMSTR_FCAN_RCFG()
 
#define FMSTR_FCAN_TLEN(pctx, len)
 
#define FMSTR_FCAN_PUTBYTE(pctx, dataByte)
 
#define FMSTR_FCAN_TCFG(pctx)
 
#define FMSTR_FCAN_TID(pctx, idr0, idr1, idr2, idr3)
 
#define FMSTR_FCAN_TPRI(pctx, txPri)
 
#define FMSTR_FCAN_TX(pctx)
 
#define FMSTR_FCAN_RX(pctx)
 
#define FMSTR_FCAN_TEST_RIDR(pctx, idr0, idr1, idr2, idr3)
 
#define FMSTR_FCAN_RLEN(pctx)
 
#define FMSTR_FCAN_GETBYTE(pctx)
 
#define FMSTR_FCAN_RFINISH(pctx)
 

Typedefs

typedef unsigned char FMSTR_U8
 
typedef unsigned short FMSTR_U16
 
typedef unsigned long FMSTR_U32
 
typedef signed char FMSTR_S8
 
typedef signed short FMSTR_S16
 
typedef signed long FMSTR_S32
 
typedef unsigned char FMSTR_FLAGS
 
typedef unsigned char FMSTR_SIZE8
 
typedef signed short FMSTR_INDEX
 
typedef unsigned char FMSTR_BCHR
 
typedef unsigned char * FMSTR_BPTR
 
typedef unsigned char FMSTR_SCISR
 

Functions

void FMSTR_CopyMemory (FMSTR_ADDR nDestAddr, FMSTR_ADDR nSrcAddr, FMSTR_SIZE8 nSize)
 The "memcpy" used internally in FreeMASTER driver. More...
 
FMSTR_BPTR FMSTR_CopyToBuffer (FMSTR_BPTR pDestBuff, FMSTR_ADDR nSrcAddr, FMSTR_SIZE8 nSize)
 Write-into the communication buffer memory. More...
 
FMSTR_BPTR FMSTR_CopyFromBuffer (FMSTR_ADDR nDestAddr, FMSTR_BPTR pSrcBuff, FMSTR_SIZE8 nSize)
 Read-out memory from communication buffer. More...
 
void FMSTR_CopyFromBufferWithMask (FMSTR_ADDR nDestAddr, FMSTR_BPTR pSrcBuff, FMSTR_SIZE8 nSize)
 Read-out memory from communication buffer, perform AND-masking. More...
 

Detailed Description

Version
1.0.7.0
Date
Aug-18-2011

Data Structure Documentation

struct FMSTR_FCAN_TCTX
Data Fields
FMSTR_U8 nDataIx
struct FMSTR_FCAN_RCTX
Data Fields
FMSTR_U8 nDataIx

Macro Definition Documentation

#define FMSTR_AddressFromBuffer (   pDest,
  pSrc 
)
#define FMSTR_AddressToBuffer (   pDest,
  nAddr 
)
#define FMSTR_ARR2ADDR
#define FMSTR_CANHW_FLEXCAN
#define FMSTR_CFG_BUS_WIDTH
#define FMSTR_CFG_FLAGS
#define FMSTR_CLRBIT16 (   base,
  offset,
  bit 
)
#define FMSTR_CLRBIT32 (   base,
  offset,
  bit 
)
#define FMSTR_CLRBIT8 (   base,
  offset,
  bit 
)
#define FMSTR_ConstToBuffer16
#define FMSTR_ConstToBuffer8
#define FMSTR_FCAN_CLEAR_RXFLG ( )
#define FMSTR_FCAN_DRXI ( )
#define FMSTR_FCAN_DTXI ( )
#define FMSTR_FCAN_ERXI ( )
#define FMSTR_FCAN_ETXI ( )
#define FMSTR_FCAN_GET_MBSTATUS ( )
#define FMSTR_FCAN_GETBYTE (   pctx)
#define FMSTR_FCAN_MAKEIDR0 (   id)
#define FMSTR_FCAN_MAKEIDR1 (   id)
#define FMSTR_FCAN_MAKEIDR2 (   id)
#define FMSTR_FCAN_MAKEIDR3 (   id)
#define FMSTR_FCAN_PUTBYTE (   pctx,
  dataByte 
)
#define FMSTR_FCAN_RCFG ( )
#define FMSTR_FCAN_RFINISH (   pctx)
#define FMSTR_FCAN_RINIT (   idr0,
  idr1,
  idr2,
  idr3 
)
#define FMSTR_FCAN_RLEN (   pctx)
#define FMSTR_FCAN_RX (   pctx)
#define FMSTR_FCAN_TCFG (   pctx)
#define FMSTR_FCAN_TEST_RIDR (   pctx,
  idr0,
  idr1,
  idr2,
  idr3 
)
#define FMSTR_FCAN_TEST_RXFLG ( )
#define FMSTR_FCAN_TEST_TXFLG ( )
#define FMSTR_FCAN_TID (   pctx,
  idr0,
  idr1,
  idr2,
  idr3 
)
#define FMSTR_FCAN_TINIT (   idr0,
  idr1,
  idr2,
  idr3 
)
#define FMSTR_FCAN_TLEN (   pctx,
  len 
)
#define FMSTR_FCAN_TPRI (   pctx,
  txPri 
)
#define FMSTR_FCAN_TX (   pctx)
#define FMSTR_FCANCTRL_EXT_RTR
#define FMSTR_FCANCTRL_EXT_SRR
#define FMSTR_FCANCTRL_IDE
#define FMSTR_FCANCTRL_STD_RTR
#define FMSTR_FCANID0_EXT_FLG
#define FMSTR_FCANIER1_OFFSET
#define FMSTR_FCANIER2_OFFSET
#define FMSTR_FCANIFR1_OFFSET
#define FMSTR_FCANIFR2_OFFSET
#define FMSTR_FCANMB_CODE_MASK
#define FMSTR_FCANMB_CRXEMPTY
#define FMSTR_FCANMB_CRXVOID
#define FMSTR_FCANMB_CTXREADY
#define FMSTR_FCANMB_CTXTRANS_ONCE
#define FMSTR_FCANRXFG_OFFSET
#define FMSTR_FCANTMR_OFFSET
#define FMSTR_FCANTXFG_OFFSET
#define FMSTR_FCMBCSR
#define FMSTR_FCMBDSR0
#define FMSTR_FCMBDSR1
#define FMSTR_FCMBDSR2
#define FMSTR_FCMBDSR3
#define FMSTR_FCMBDSR4
#define FMSTR_FCMBDSR5
#define FMSTR_FCMBDSR6
#define FMSTR_FCMBDSR7
#define FMSTR_FCMBIDR0
#define FMSTR_FCMBIDR1
#define FMSTR_FCMBIDR2
#define FMSTR_FCMBIDR3
#define FMSTR_GETREG16 (   base,
  offset 
)
#define FMSTR_GETREG32 (   base,
  offset 
)
#define FMSTR_GETREG8 (   base,
  offset 
)
#define FMSTR_GetS16 (   addr)
#define FMSTR_GetS32 (   addr)
#define FMSTR_GetS8 (   addr)
#define FMSTR_GetU16 (   addr)
#define FMSTR_GetU32 (   addr)
#define FMSTR_GetU8 (   addr)
#define FMSTR_GLOB_VERSION_MAJOR
#define FMSTR_GLOB_VERSION_MINOR
#define FMSTR_IDT_STRING
#define FMSTR_PROT_VER
#define FMSTR_PTR2ADDR (   tmpAddr,
  ptr 
)
#define FMSTR_SCI_DRXI ( )
#define FMSTR_SCI_DTXI ( )
#define FMSTR_SCI_ERXI ( )
#define FMSTR_SCI_ETXI ( )
#define FMSTR_SCI_GETCHAR ( )
#define FMSTR_SCI_GETSR ( )
#define FMSTR_SCI_PUTCHAR (   ch)
#define FMSTR_SCI_RD ( )
#define FMSTR_SCI_RDCLRSR ( )
#define FMSTR_SCI_RE ( )
#define FMSTR_SCI_TD ( )
#define FMSTR_SCI_TE ( )
#define FMSTR_SCI_TE_RE ( )
#define FMSTR_SCIBDH_OFFSET
#define FMSTR_SCIBDL_OFFSET
#define FMSTR_SCIC1_ILT
#define FMSTR_SCIC1_LOOPS
#define FMSTR_SCIC1_M
#define FMSTR_SCIC1_OFFSET
#define FMSTR_SCIC1_PE
#define FMSTR_SCIC1_PT
#define FMSTR_SCIC1_RSRC
#define FMSTR_SCIC1_SWAI
#define FMSTR_SCIC1_WAKE
#define FMSTR_SCIC2_ILIE
#define FMSTR_SCIC2_OFFSET
#define FMSTR_SCIC2_RE
#define FMSTR_SCIC2_RIE
#define FMSTR_SCIC2_RWU
#define FMSTR_SCIC2_SBK
#define FMSTR_SCIC2_TCIE
#define FMSTR_SCIC2_TE
#define FMSTR_SCIC2_TIE
#define FMSTR_SCIC3_OFFSET
#define FMSTR_SCIDR_OFFSET
#define FMSTR_SCIS1_OFFSET
#define FMSTR_SCIS2_OFFSET
#define FMSTR_SCISR2_BRK13
#define FMSTR_SCISR2_RAF
#define FMSTR_SCISR2_TXDIR
#define FMSTR_SCISR_FE
#define FMSTR_SCISR_IDLE
#define FMSTR_SCISR_NF
#define FMSTR_SCISR_OR
#define FMSTR_SCISR_PF
#define FMSTR_SCISR_RDRF
#define FMSTR_SCISR_TC
#define FMSTR_SCISR_TDRE
#define FMSTR_SETBIT16 (   base,
  offset,
  bit 
)
#define FMSTR_SETBIT32 (   base,
  offset,
  bit 
)
#define FMSTR_SETBIT8 (   base,
  offset,
  bit 
)
#define FMSTR_SetExAddr (   bNextAddrIsEx)
#define FMSTR_SETREG16 (   base,
  offset,
  value 
)
#define FMSTR_SETREG32 (   base,
  offset,
  value 
)
#define FMSTR_SETREG8 (   base,
  offset,
  value 
)
#define FMSTR_SkipInBuffer (   pDest,
  nSize 
)
#define FMSTR_TSA_FLAGS
#define FMSTR_TSTBIT16 (   base,
  offset,
  bit 
)
#define FMSTR_TSTBIT32 (   base,
  offset,
  bit 
)
#define FMSTR_USE_EX_CMDS
#define FMSTR_USE_NOEX_CMDS
#define FMSTR_ValueFromBuffer16 (   pDest,
  pSrc 
)
#define FMSTR_ValueFromBuffer32 (   pDest,
  pSrc 
)
#define FMSTR_ValueFromBuffer8 (   pDest,
  pSrc 
)
#define FMSTR_ValueToBuffer16 (   pDest,
  src 
)
#define FMSTR_ValueToBuffer32 (   pDest,
  src 
)
#define FMSTR_ValueToBuffer8 (   pDest,
  src 
)

Typedef Documentation

typedef unsigned char FMSTR_BCHR
typedef unsigned char* FMSTR_BPTR
typedef unsigned char FMSTR_FLAGS
typedef signed short FMSTR_INDEX
typedef signed short FMSTR_S16
typedef signed long FMSTR_S32
typedef signed char FMSTR_S8
typedef unsigned char FMSTR_SCISR
typedef unsigned char FMSTR_SIZE8
typedef unsigned short FMSTR_U16
typedef unsigned long FMSTR_U32
typedef unsigned char FMSTR_U8

Function Documentation

FMSTR_BPTR FMSTR_CopyFromBuffer ( FMSTR_ADDR  nDestAddr,
FMSTR_BPTR  pSrcBuff,
FMSTR_SIZE8  nSize 
)
Parameters
nDestAddr- destination memory address
pSrcBuff- pointer to source memory in communication buffer
nSize- buffer size (always in bytes)
Returns
This function returns a pointer to next byte in comm. buffer
void FMSTR_CopyFromBufferWithMask ( FMSTR_ADDR  nDestAddr,
FMSTR_BPTR  pSrcBuff,
FMSTR_SIZE8  nSize 
)
Parameters
nDestAddr- destination memory address
pSrcBuff- source memory in communication buffer, mask follows data
nSize- buffer size (always in bytes)
void FMSTR_CopyMemory ( FMSTR_ADDR  nDestAddr,
FMSTR_ADDR  nSrcAddr,
FMSTR_SIZE8  nSize 
)
Parameters
nDestAddr- destination memory address
nSrcAddr- source memory address
nSize- memory size (always in bytes)
FMSTR_BPTR FMSTR_CopyToBuffer ( FMSTR_BPTR  pDestBuff,
FMSTR_ADDR  nSrcAddr,
FMSTR_SIZE8  nSize 
)
Parameters
pDestBuff- pointer to destination memory in communication buffer
nSrcAddr- source memory address
nSize- buffer size (always in bytes)
Returns
This function returns a pointer to next byte in comm. buffer