#include <conio.h>
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Data Structures | |
struct | DmaInfo |
struct | DmaRegs |
Defines | |
#define | PCB_BASE 0xff00 |
#define | PCB_RELREG (PCB_BASE + 0xFE) |
#define | PCB_RESCON (PCB_BASE + 0xF6) |
#define | PCB_PRL (PCB_BASE + 0xF4) |
#define | PCB_AUXCON (PCB_BASE + 0xF2) |
#define | PCB_SYSCON (PCB_BASE + 0xF0) |
#define | PCB_WDT (PCB_BASE + 0xE6) |
#define | PCB_EDRAM (PCB_BASE + 0xE4) |
#define | PCB_CDRAM (PCB_BASE + 0xE2) |
#define | PCB_D1CON (PCB_BASE + 0xDA) |
#define | PCB_D1TC (PCB_BASE + 0xD8) |
#define | PCB_D1DSTH (PCB_BASE + 0xD6) |
#define | PCB_D1DSTL (PCB_BASE + 0xD4) |
#define | PCB_D1SRCH (PCB_BASE + 0xD2) |
#define | PCB_D1SRCL (PCB_BASE + 0xD0) |
#define | PCB_D0CON (PCB_BASE + 0xCA) |
#define | PCB_D0TC (PCB_BASE + 0xC8) |
#define | PCB_D0DSTH (PCB_BASE + 0xC6) |
#define | PCB_D0DSTL (PCB_BASE + 0xC4) |
#define | PCB_D0SRCH (PCB_BASE + 0xC2) |
#define | PCB_D0SRCL (PCB_BASE + 0xC0) |
#define | PCB_MPCS (PCB_BASE + 0xA8) |
#define | PCB_MMCS (PCB_BASE + 0xA6) |
#define | PCB_PACS (PCB_BASE + 0xA4) |
#define | PCB_LMCS (PCB_BASE + 0xA2) |
#define | PCB_UMCS (PCB_BASE + 0xA0) |
#define | PCB_SP0BAUD (PCB_BASE + 0x88) |
#define | PCB_SP0RD (PCB_BASE + 0x86) |
#define | PCB_SP0TD (PCB_BASE + 0x84) |
#define | PCB_SP0STS (PCB_BASE + 0x82) |
#define | PCB_SP0CT (PCB_BASE + 0x80) |
#define | PCB_PDATA1 (PCB_BASE + 0x7A) |
#define | PCB_PDIR1 (PCB_BASE + 0x78) |
#define | PCB_PIOMODE1 (PCB_BASE + 0x76) |
#define | PCB_PDATA0 (PCB_BASE + 0x74) |
#define | PCB_PDIR0 (PCB_BASE + 0x72) |
#define | PCB_PIOMODE0 (PCB_BASE + 0x70) |
#define | PCB_T2CON (PCB_BASE + 0x66) |
#define | PCB_T2CMPA (PCB_BASE + 0x62) |
#define | PCB_T2CNT (PCB_BASE + 0x60) |
#define | PCB_T1CON (PCB_BASE + 0x5E) |
#define | PCB_T1CMPB (PCB_BASE + 0x5C) |
#define | PCB_T1CMPA (PCB_BASE + 0x5A) |
#define | PCB_T1CNT (PCB_BASE + 0x58) |
#define | PCB_T0CON (PCB_BASE + 0x56) |
#define | PCB_T0CMPB (PCB_BASE + 0x54) |
#define | PCB_T0CMPA (PCB_BASE + 0x52) |
#define | PCB_T0CNT (PCB_BASE + 0x50) |
#define | PCB_SP0CON (PCB_BASE + 0x44) |
#define | PCB_SP1CON (PCB_BASE + 0x42) |
#define | PCB_INT4CON (PCB_BASE + 0x40) |
#define | PCB_INT3CON (PCB_BASE + 0x3E) |
#define | PCB_INT2CON (PCB_BASE + 0x3C) |
#define | PCB_INT1CON (PCB_BASE + 0x3A) |
#define | PCB_T2INTCON (PCB_BASE + 0x3A) |
#define | PCB_INT0CON (PCB_BASE + 0x38) |
#define | PCB_T1INTCON (PCB_BASE + 0x38) |
#define | PCB_DMA1CON (PCB_BASE + 0x36) |
#define | PCB_INT6CON (PCB_BASE + 0x36) |
#define | PCB_DMA0CON (PCB_BASE + 0x34) |
#define | PCB_INT5CON (PCB_BASE + 0x34) |
#define | PCB_TCUCON (PCB_BASE + 0x32) |
#define | PCB_T0INTCON (PCB_BASE + 0x32) |
#define | PCB_INTSTS (PCB_BASE + 0x30) |
#define | PCB_REQST (PCB_BASE + 0x2E) |
#define | PCB_INSERV (PCB_BASE + 0x2C) |
#define | PCB_PRIMSK (PCB_BASE + 0x2A) |
#define | PCB_IMASK (PCB_BASE + 0x28) |
#define | PCB_POLLST (PCB_BASE + 0x26) |
#define | PCB_POLL (PCB_BASE + 0x24) |
#define | PCB_EOI (PCB_BASE + 0x22) |
#define | PCB_INTVEC (PCB_BASE + 0x20) |
#define | PCB_SP1BAUD (PCB_BASE + 0x18) |
#define | PCB_SP1RD (PCB_BASE + 0x16) |
#define | PCB_SP1TD (PCB_BASE + 0x14) |
#define | PCB_SP1STS (PCB_BASE + 0x12) |
#define | PCB_SP1CT (PCB_BASE + 0x10) |
#define | DCON_BW 0x0001 |
#define | DCON_ST 0x0002 |
#define | DCON_CHG 0x0004 |
#define | DCON_EXT 0x0008 |
#define | DCON_TDRQ 0x0010 |
#define | DCON_P 0x0020 |
#define | DCON_SYN0 0x0040 |
#define | DCON_SYN1 0x0080 |
#define | DCON_INT 0x0100 |
#define | DCON_TC 0x0200 |
#define | DCON_SINC 0x0400 |
#define | DCON_SDEC 0x0800 |
#define | DCON_SMIO 0x1000 |
#define | DCON_DINC 0x2000 |
#define | DCON_DDEC 0x4000 |
#define | DCON_DMIO 0x8000 |
#define | DCON_UNSYNC 0 |
#define | DCON_SSYNC DCON_SYN0 |
#define | DCON_DSYNC DCON_SYN1 |
#define | DCON_START (DCON_CHG | DCON_ST) |
#define | DCON_STOP (DCON_CHG) |
#define | TCON_CONT 0x0001 |
#define | TCON_ALT 0x0002 |
#define | TCON_EXT 0x0004 |
#define | TCON_P 0x0008 |
#define | TCON_RTG 0x0010 |
#define | TCON_MC 0x0020 |
#define | TCON_RIU 0x1000 |
#define | TCON_INT 0x2000 |
#define | TCON_INH 0x4000 |
#define | TCON_EN 0x8000 |
#define | TCON_START (TCON_INH | TCON_EN) |
#define | TCON_STOP (TCON_INH) |
Functions | |
unsigned long | AMD_GetPioData () |
AMD PIO functions !!! USE WITH CAUTION !!! | |
unsigned long | AMD_GetPioDir () |
unsigned long | AMD_GetPioMode () |
void | AMD_PioHigh (const int pio) |
void | AMD_PioLow (const int pio) |
int | AMD_GetPio (const int pio) |
void | AMD_TestPios () |
Test the mapping between SC12 and AMD PIO pins. | |
void | AMD_SetPioData (unsigned long mask, unsigned long data) |
Set the AMD PIO Data register. | |
void | AMD_SetPioDir (unsigned long mask, unsigned long dir) |
Set the AMD PIO Direction register. | |
void | AMD_SetPioMode (unsigned long mask, unsigned long mode) |
Set the AMD PIO Mode register. | |
void | AMD_SetPcsWaitStates (int waitstates) |
Set PCS0-3 Chipselect Waitstates. | |
void | AMD_StartDma (int channel, DmaInfo *dma) |
Initiate a DMA Transfer. | |
void | AMD_StopDma (int channel) |
Immediately Stop a DMA Transfer. | |
void | AMD_GetDmaInfo (int channel, DmaInfo *dma) |
Get information about current DMA Transfer. | |
void | AMD_EnableDrq (int channel, int onoff) |
void | REP_INSB (int port, void *dest, int numBytes) |
Wrapper for REP INSB instruction. | |
void | REP_INSW (int port, void *dest, int numWords) |
Wrapper for REP INSW instruction. | |
void | REP_OUTSB (int port, void *src, int numBytes) |
Wrapper for REP OUTSB instruction. | |
void | REP_OUTSW (int port, void *src, int numWords) |
Wrapper for REP OUTSW instruction. | |
void | usleep (unsigned us) |
Wait some microseconds. | |
Variables | |
const unsigned long | AMD_PIOMASK [14] |
AMD186ED PIO masks for the SC12. | |
const unsigned int | AMD_PIOPIN [14] |
|
Definition at line 91 of file amd186.h. Referenced by RC_Init(). |
|
|
|
|
|
Definition at line 105 of file amd186.h. Referenced by RC_Init(). |
|
Definition at line 107 of file amd186.h. Referenced by AMD_GetDmaInfo(), AMD_StartDma(), and RC_Init(). |
|
Definition at line 111 of file amd186.h. Referenced by VS_PlayMpegAsync(). |
|
|
|
Definition at line 99 of file amd186.h. Referenced by VS_PlayMpegAsync(). |
|
Definition at line 96 of file amd186.h. Referenced by RC_Init(). |
|
|
|
Definition at line 101 of file amd186.h. Referenced by VS_PlayMpegAsync(). |
|
Definition at line 103 of file amd186.h. Referenced by AMD_GetDmaInfo(), AMD_StartDma(), and VS_PlayMpegAsync(). |
|
Definition at line 110 of file amd186.h. Referenced by RC_Init(). |
|
Definition at line 92 of file amd186.h. Referenced by AMD_GetDmaInfo(), and VS_IsPlaying(). |
|
Definition at line 113 of file amd186.h. Referenced by AMD_GetDmaInfo(), AMD_StartDma(), and AMD_StopDma(). |
|
Definition at line 114 of file amd186.h. Referenced by AMD_GetDmaInfo(), AMD_StartDma(), and AMD_StopDma(). |
|
|
|
|
|
Definition at line 100 of file amd186.h. Referenced by RC_Init(), and VS_PlayMpegAsync(). |
|
|
|
|
|
|
|
|
|
|
|
Definition at line 26 of file amd186.h. Referenced by AMD_GetDmaInfo(), AMD_StartDma(), and AMD_StopDma(). |
|
Definition at line 28 of file amd186.h. Referenced by AMD_StartDma(). |
|
Definition at line 29 of file amd186.h. Referenced by AMD_GetDmaInfo(), and AMD_StartDma(). |
|
Definition at line 30 of file amd186.h. Referenced by AMD_GetDmaInfo(), and AMD_StartDma(). |
|
Definition at line 31 of file amd186.h. Referenced by AMD_GetDmaInfo(), and AMD_StartDma(). |
|
Definition at line 27 of file amd186.h. Referenced by AMD_GetDmaInfo(), and AMD_StartDma(). |
|
Definition at line 20 of file amd186.h. Referenced by AMD_GetDmaInfo(), AMD_StartDma(), and AMD_StopDma(). |
|
Definition at line 22 of file amd186.h. Referenced by AMD_StartDma(). |
|
Definition at line 23 of file amd186.h. Referenced by AMD_GetDmaInfo(), and AMD_StartDma(). |
|
Definition at line 24 of file amd186.h. Referenced by AMD_GetDmaInfo(), and AMD_StartDma(). |
|
Definition at line 25 of file amd186.h. Referenced by AMD_GetDmaInfo(), and AMD_StartDma(). |
|
Definition at line 21 of file amd186.h. Referenced by AMD_GetDmaInfo(), and AMD_StartDma(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 34 of file amd186.h. Referenced by AMD_SetPcsWaitStates(). |
|
Definition at line 45 of file amd186.h. Referenced by AMD_GetPio(), AMD_GetPioData(), AMD_PioHigh(), AMD_PioLow(), and AMD_SetPioData(). |
|
Definition at line 42 of file amd186.h. Referenced by AMD_GetPio(), AMD_GetPioData(), AMD_PioHigh(), AMD_PioLow(), and AMD_SetPioData(). |
|
Definition at line 46 of file amd186.h. Referenced by AMD_GetPioDir(), and AMD_SetPioDir(). |
|
Definition at line 43 of file amd186.h. Referenced by AMD_GetPioDir(), and AMD_SetPioDir(). |
|
Definition at line 47 of file amd186.h. Referenced by AMD_GetPioMode(), and AMD_SetPioMode(). |
|
Definition at line 44 of file amd186.h. Referenced by AMD_GetPioMode(), and AMD_SetPioMode(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 53 of file amd186.h. Referenced by RC_Init(). |
|
|
|
Definition at line 54 of file amd186.h. Referenced by RC_Init(). |
|
|
|
|
|
Definition at line 49 of file amd186.h. Referenced by ZTimer_Start(), and ZTimer_Stop(). |
|
Definition at line 50 of file amd186.h. Referenced by ZTimer_Start(), and ZTimer_Stop(). |
|
Definition at line 48 of file amd186.h. Referenced by ZTimer_Start(), and ZTimer_Stop(). |
|
|
|
|
|
|
|
|
|
|
|
Definition at line 117 of file amd186.h. Referenced by RC_Init(). |
|
|
|
|
|
|
|
Definition at line 124 of file amd186.h. Referenced by RC_Init(). |
|
|
|
|
|
|
|
|
|
Definition at line 128 of file amd186.h. Referenced by RC_Init(), ZTimer_Start(), and ZTimer_Stop(). |
|
Definition at line 129 of file amd186.h. Referenced by RC_Done(), RC_Init(), and ZTimer_Start(). |
|
Definition at line 464 of file amd186.cpp. References AMD_SetPioDir(), and AMD_SetPioMode(). Referenced by RC_Init(), SCI_ReadReg(), SCI_WriteReg(), VS_PlayMpegAsync(), and VS_Reset(). |
|
Get information about current DMA Transfer. \note: in order to read the DMA status reliably, a running transfer will be interrupted while the registers are read. This might be an issue, if you do something very timing critical!
Definition at line 424 of file amd186.cpp. References DmaInfo::control, DCON_DMIO, DCON_SMIO, DCON_ST, DCON_START, DCON_STOP, DmaInfo::dstMem, DmaInfo::dstPort, DmaInfo::length, PCB_D0CON, PCB_D0DSTL, PCB_D0SRCH, PCB_D0SRCL, PCB_D0TC, PCB_D1CON, PCB_D1DSTL, PCB_D1SRCH, PCB_D1SRCL, PCB_D1TC, DmaInfo::srcMem, and DmaInfo::srcPort. Referenced by timerHandler(), and VS_IsPlaying(). |
|
Definition at line 217 of file amd186.h. References PCB_PDATA0, and PCB_PDATA1. Referenced by SCI_Read(). |
|
AMD PIO functions !!! USE WITH CAUTION !!! You may have to enclose direct PIO writes in CLI/STI pairs to ensure that the BIOS doesn't interfere during the access. This may happen, because the current pio state gets read, processed and then written back. Mode Direction Function 0 0 Normal operation 0 1 PIO input with pullup/pulldown 1 0 PIO output 1 1 PIO input w/o pullup/pulldown Definition at line 185 of file amd186.h. References PCB_PDATA0, and PCB_PDATA1. |
|
Definition at line 190 of file amd186.h. References PCB_PDIR0, and PCB_PDIR1. Referenced by AMD_TestPios(). |
|
Definition at line 195 of file amd186.h. References PCB_PIOMODE0, and PCB_PIOMODE1. |
|
Definition at line 201 of file amd186.h. References PCB_PDATA0, and PCB_PDATA1. Referenced by SCI_Read(), SCI_ReadReg(), SCI_Write(), and SCI_WriteReg(). |
|
Definition at line 209 of file amd186.h. References PCB_PDATA0, and PCB_PDATA1. Referenced by SCI_Read(), SCI_ReadReg(), SCI_Write(), and SCI_WriteReg(). |
|
Set PCS0-3 Chipselect Waitstates. Note that you cannot modify the PCS5 and 6 waitstates. The SC12 hardware manual says that they must remain set to 3 waitstates.
Definition at line 350 of file amd186.cpp. References PCB_PACS. |
|
Set the AMD PIO Data register. Please see the AMD186ED user manual before using this function. Always remember that there is a strange mapping between the SC12 PIO pins and the real AMD ones
Definition at line 212 of file amd186.cpp. References PCB_PDATA0, and PCB_PDATA1. |
|
Set the AMD PIO Direction register. Please see the AMD186ED user manual before using this function. Always remember that there is a strange mapping between the SC12 PIO pins and the real AMD ones
Definition at line 258 of file amd186.cpp. References PCB_PDIR0, and PCB_PDIR1. Referenced by AMD_EnableDrq(). |
|
Set the AMD PIO Mode register. Please see the AMD186ED user manual before using this function. Always remember that there is a strange mapping between the SC12 PIO pins and the real AMD ones
Definition at line 304 of file amd186.cpp. References PCB_PIOMODE0, and PCB_PIOMODE1. Referenced by AMD_EnableDrq(). |
|
Initiate a DMA Transfer. Please read chapter 9 of the AMD 186ED user manual before using this function (the DMAInfo structure should be quite self-explanatory then)
Definition at line 372 of file amd186.cpp. References DmaInfo::control, DCON_DMIO, DCON_SMIO, DCON_START, DCON_STOP, DmaInfo::dstMem, DmaInfo::dstPort, DmaInfo::length, PCB_D0CON, PCB_D0DSTH, PCB_D0DSTL, PCB_D0SRCH, PCB_D0SRCL, PCB_D0TC, PCB_D1CON, PCB_D1DSTH, PCB_D1DSTL, PCB_D1SRCH, PCB_D1SRCL, PCB_D1TC, src, DmaInfo::srcMem, and DmaInfo::srcPort. Referenced by RC_Init(), timerHandler(), and VS_PlayMpegAsync(). |
|
Immediately Stop a DMA Transfer.
Definition at line 403 of file amd186.cpp. References DCON_START, DCON_STOP, PCB_D0CON, and PCB_D1CON. |
|
Test the mapping between SC12 and AMD PIO pins. This function doesn't need to be called by a user program, and is only useful if there's a new, incompatible revision of the @chip. (as they always promise ;)
Definition at line 182 of file amd186.cpp. References AMD_GetPioDir(), pfe_enable_pio(), PIO_IPD, PIO_IPU, and PIO_O0. |
|
Wrapper for REP INSB instruction.
Definition at line 32 of file amd186.cpp. |
|
Wrapper for REP INSW instruction.
Definition at line 63 of file amd186.cpp. |
|
Wrapper for REP OUTSB instruction.
Definition at line 94 of file amd186.cpp. References src. |
|
Wrapper for REP OUTSW instruction.
Definition at line 125 of file amd186.cpp. References src. |
|
Wait some microseconds. This function has been tested on an IPC@Chip SC12 at 20MHz, and is not very accurate. You can time the actual delay by using the ZTimer functions.
Definition at line 159 of file amd186.cpp. Referenced by SCI_ReadReg(), SCI_WriteReg(), and VS_Reset(). |
|
Initial value: { 0x00002000L, 0x00001000L, 0x00000004L, 0x00000008L, 0x00020000L, 0x00080000L, 0x00040000L, 0x00800000L, 0x00400000L, 0x00200000L, 0x00100000L, 0x08000000L, 0x10000000L, 0x00000400L } Use with the AMD_PIO functions, generated by AMD_TestPIOs() |
|
Initial value: { 13, 12, 2, 3, 17, 19, 18, 23, 22, 21, 20, 27, 28, 10 } |