#include <config.h>
#include <mc68332.h>
#include <sys_var.h>
#include <schedule.h>
#include <taskconst.h>
#include <seminl.h>
Include dependency graph for cubeos.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Defines | |
#define | readbyte(x) (*(volatile unsigned char *)x) |
reads one byte from memory location x. More... | |
#define | writebyte(x, y) *(unsigned char *)(x) = y |
writes one byte y to memory location x. More... | |
#define | readshort(x) (*(unsigned short *)(void *)(x)) |
reads one short from memory location x. More... | |
#define | writeshort(x, y) *(unsigned short *)(x) = y |
writes one short y to memory location x. More... | |
#define | readint(x) (*(unsigned int *)(void *)(x)) |
reads one int from memory location x. More... | |
#define | writeint(x, y) *(unsigned int *)(x) = y |
writes one int y to memory location x. More... | |
#define | writeshortpos(x, y, mask, pos) |
writes some bits of y to memory location x. More... | |
#define | readshortpos(x, mask, pos) ((readshort(x)>>(pos))&(mask)) |
reads some bits of y to memory location x. More... | |
Functions | |
void | disable () |
disables interrupt processing. More... | |
void | enable () |
enable interrupt processing. More... | |
void | init_LED () |
init control of the CUBE-II onboard status LED. More... | |
void | LED_ON () |
switches the CUBE-II onboard LED on. More... | |
void | LED_OFF () |
switches the CUBE-II onboard LED off. More... |
Definition in file cubeos.h.
|
reads one byte from memory location x.
Definition at line 120 of file cubeos.h. Referenced by DUART_duart, FBIN_make, FBIN_set, and QSM_init. |
|
reads one int from memory location x.
|
|
reads one short from memory location x.
Definition at line 122 of file cubeos.h. Referenced by _QSM_sci_dis_rx, _QSM_sci_dis_tx, _QSM_sci_en_rx, _QSM_sci_en_tx, _QSM_sci_txbyte, FLASH_bcopy, FLASH_init, I2C_init, KERN_exphandler, KERN_panic, KERN_softreset, QSM_sci_int, QSM_sci_rxchar, RCJ_init, RG_init, and SPI_init. |
|
reads some bits of y to memory location x.
readshortpos(x,mask,pos) reads memoy location x, shifts it pos bits right and masks the remaining bits with mask. example: readshortshortpos(TPU_CFSR3,0xf,0x8) reads the function code (4 bits wide, so mask 0xf) out of the TPU channel function select register of TPU Channel 2 (bits 8-11) Definition at line 149 of file cubeos.h. Referenced by getRCD. |
|
writes one byte y to memory location x.
Definition at line 121 of file cubeos.h. Referenced by clearRRXSEL, clearRTXSEL, DUART_duart, FBIN_make, FBIN_set, init_LED, LED_OFF, LED_ON, QSM_init, setRRXSEL, setRTXSEL, and SPI_newcommand. |
|
writes one int y to memory location x.
Definition at line 125 of file cubeos.h. Referenced by _KERN_initcontext. |
|
writes one short y to memory location x.
Definition at line 123 of file cubeos.h. Referenced by _QSM_sci_dis_rx, _QSM_sci_dis_tx, _QSM_sci_en_rx, _QSM_sci_en_tx, _QSM_sci_setbps, _QSM_sci_txbyte, _settimeofday, FBIN_make, FBIN_set, FLASH_bcopy, FLASH_init, I2C_init, KERN_exphandler, KERN_init_ptimer, KERN_panic, KERN_softreset, QSM_init, QSM_sci_int, QSM_sciinit, RCJ_fast, RCJ_init, RCJ_slow, RG_init, settimeofday, SPI_init, SPI_resetcmd, and TPU_init. |
|
Value: writeshort(x,(readshort(x)\ &(~((mask)<<(pos)))) \ |(((mask)&y)<<(pos)))
writeshortpos(x,y,mask,pos) masks y with mask, shifts it pos bits left and masks the remaining bits into the memory location x. example: writeshortpos(TPU_CFSR3,0x9,0xf,0x8) writes function code 0x9 (4 bits wide, so mask 0xf) into TPU channel function select register for TPU Channel 2 (bits 8-11) Definition at line 136 of file cubeos.h. Referenced by KERN_init_ptimer. |
|
init control of the CUBE-II onboard status LED.
This reconfigures the Port E of the mc68332 so that one bit is used for output. |
|
switches the CUBE-II onboard LED off.
Definition at line 169 of file cubeos.h. References SIM_PORTE, and writebyte. Referenced by FLASH_bcopy. |
|
switches the CUBE-II onboard LED on.
Definition at line 163 of file cubeos.h. References SIM_PORTE, and writebyte. Referenced by FLASH_bcopy. |