Main Page   Data Structures   File List   Data Fields   Globals   Related Pages  

clib/HWAPI.H File Reference

Go to the source code of this file.

Data Structures

struct  _REMOP
struct  Dma_Info
struct  REMOP_ENTRY

Defines

#define PFE_ENABLE_DATA_BUS   0x80
#define PFE_ENABLE_NON_MULTI_ADDR_BUS   0x81
#define PFE_ENABLE_PIO   0x82
#define PFE_ENABLE_PCS   0x83
#define PFE_ENABLE_EXTERNAL_IRQ   0x84
#define PFE_ENABLE_EXTERNAL_TIMER   0x85
#define PFE_SET_EDGE_LEVEL_INTR_MODE   0x86
#define PFE_ENABLE_PWD   0x87
#define PFE_ENABLE_EXTERNAL_DMA   0x88
#define PFE_ENABLE_INT_CASCADE_MODE   0x89
#define HAL_SET_INT0_VECT   0x10
#define HAL_READ_DATA_BUS   0x80
#define HAL_WRITE_DATA_BUS   0x81
#define HAL_READ_PIO   0x82
#define HAL_WRITE_PIO   0x83
#define HAL_INSTALL_ISR   0x84
#define HAL_INIT_TIMER   0x85
#define HAL_START_TIMER   0x86
#define HAL_STOP_TIMER   0x87
#define HAL_READ_TIMER_COUNT   0x88
#define HAL_WRITE_TIMER_COUNT   0x89
#define HAL_GET_FREQUENCIES   0x8A
#define HAL_SET_DUTY_CYCLE_WAVEFORM   0x8B
#define HAL_READ_SPECIFIC_PIO   0x8C
#define HAL_WRITE_SPECIFIC_PIO   0x8D
#define HAL_GIVE_EOI   0x8E
#define HAL_GET_SET_WATCHDOG_MODE   0x90
#define HAL_REFRESH_WATCHDOG   0x91
#define HAL_BLOCK_READ_DATA_BUS   0xA0
#define HAL_BLOCK_WRITE_DATA_BUS   0xA1
#define HAL_START_DMA   0xB0
#define HAL_STOP_DMA   0xB1
#define HAL_GET_DMA_INFO   0xB2
#define HAL_INIT_REST_NON_VOLATILE_DATA   0xC0
#define HAL_SAVE_NON_VOLATILE_DATA   0xC1
#define HAL_GET_REBOOT_REASON   0xC2
#define PFE_INT   0xA2
#define HAL_INT   0xA1
#define DIRECT_IO
#define PIO_I   1
#define PIO_IPU   2
#define PIO_IPD   3
#define PIO_O1   4
#define PIO_O0   5
#define A0   0
#define A1   1
#define A2   2
#define GET_FRQ_PROCESSOR   0
#define GET_FRQ_TIMER   1
#define GET_FRQ_MAX_BAUD   2
#define GET_FRQ_PWD   3
#define hal_inportb(x)   inportb(x)
#define hal_outportb(x, y)   outportb(x,y)
#define hal_inportb_block   hal_readblock_bus
#define hal_outportb_block   hal_writeblock_bus
#define DMA_PRIO   (1<<0)
#define DMA_SYNCSRC   (1<<1)
#define DMA_SYNCDEST   (1<<2)
#define DMA_DOINTR   (1<<3)
#define DMA_SRCINC   (1<<5)
#define DMA_SRCDEC   (1<<6)
#define DMA_SRCIO   (0)
#define DMA_SRCMEM   (1<<7)
#define DMA_DESTINC   (1<<8)
#define DMA_DESTDEC   (1<<9)
#define DMA_DESTIO   (0)
#define DMA_DESTMEM   (1<<10)
#define DMA_WORDTRANS   (1<<11)
#define DMA_CH0   0
#define DMA_CH1   1
#define MAX_RETENTIVE_AREAS   10

Typedefs

typedef void interrupt(* InterruptHandler )(void)
typedef _REMOP Remop

Functions

void pfe_enable_bus (unsigned mask, unsigned char ale)
void pfe_enable_adr (unsigned char adr)
void pfe_enable_pcs (unsigned char pcs)
void pfe_enable_int (unsigned char irq)
void pfe_enable_timer (unsigned mode)
void pfe_enable_pio (unsigned pio, unsigned char mode)
void pfe_get_pio_state (unsigned *wPio, unsigned *wInp, unsigned *wOut)
void pfe_set_edge_level_intr_mode (unsigned char mode, unsigned mask)
void pfe_enable_pwd (void)
int pfe_enable_external_dma (unsigned char channel)
void pfe_enable_int_cascade_mode (void)
unsigned char hal_read_bus (unsigned adr, unsigned wAND, unsigned wXOR)
void hal_write_bus (unsigned adr, unsigned char value, unsigned wAND, unsigned wXOR)
void hal_readblock_bus (unsigned adr0, unsigned adr1, unsigned char *buf, unsigned cnt)
void hal_writeblock_bus (unsigned adr0, unsigned adr1, unsigned char *buf, unsigned cnt)
void hal_get_pio_output_state (unsigned *pins, unsigned wOut)
unsigned hal_read_pios (unsigned wAND, unsigned wXOR)
void hal_write_pios (unsigned value, unsigned wAND, unsigned wXOR)
unsigned char hal_read_pio (unsigned char pio)
void hal_write_pio (unsigned char pio, unsigned value)
InterruptHandler hal_install_isr (unsigned irq, unsigned count, InterruptHandler handler)
void hal_init_timer (unsigned char timer, unsigned mode, unsigned divider)
void hal_start_timer (unsigned char timer)
void hal_stop_timer (unsigned char timer)
unsigned hal_read_timer_count (unsigned char timer, unsigned far *maxcount)
void hal_write_timer_count (unsigned char timer, unsigned counter)
unsigned char hal_set_watchdog_mode (unsigned char mode)
void hal_refresh_watchdog (void)
unsigned long hal_get_frequencies (unsigned char frq)
void hal_set_duty_cycle_waveform (unsigned char timer, int mode, unsigned clock_divider)
void hal_give_eoi (unsigned char intr_no)
void hal_start_dma (unsigned char channel, Dma_Info *dmaInfo)
int hal_stop_dma (unsigned char channel)
int hal_get_dma_info (unsigned char channel, Dma_Info *dmaInfo)
int hal_init_non_volatile_data (Remop *remop)
void hal_save_non_volatile_data (void)
int hal_get_reboot_reason (void)


Define Documentation

#define A0   0
 

Definition at line 119 of file HWAPI.H.

#define A1   1
 

Definition at line 120 of file HWAPI.H.

#define A2   2
 

Definition at line 121 of file HWAPI.H.

#define DIRECT_IO
 

Definition at line 110 of file HWAPI.H.

#define DMA_CH0   0
 

Definition at line 156 of file HWAPI.H.

#define DMA_CH1   1
 

Definition at line 157 of file HWAPI.H.

#define DMA_DESTDEC   (1<<9)
 

Definition at line 150 of file HWAPI.H.

#define DMA_DESTINC   (1<<8)
 

Definition at line 149 of file HWAPI.H.

#define DMA_DESTIO   (0)
 

Definition at line 151 of file HWAPI.H.

#define DMA_DESTMEM   (1<<10)
 

Definition at line 152 of file HWAPI.H.

Referenced by hal_get_dma_info(), and hal_start_dma().

#define DMA_DOINTR   (1<<3)
 

Definition at line 144 of file HWAPI.H.

#define DMA_PRIO   (1<<0)
 

Definition at line 141 of file HWAPI.H.

#define DMA_SRCDEC   (1<<6)
 

Definition at line 146 of file HWAPI.H.

#define DMA_SRCINC   (1<<5)
 

Definition at line 145 of file HWAPI.H.

#define DMA_SRCIO   (0)
 

Definition at line 147 of file HWAPI.H.

#define DMA_SRCMEM   (1<<7)
 

Definition at line 148 of file HWAPI.H.

Referenced by hal_get_dma_info(), and hal_start_dma().

#define DMA_SYNCDEST   (1<<2)
 

Definition at line 143 of file HWAPI.H.

#define DMA_SYNCSRC   (1<<1)
 

Definition at line 142 of file HWAPI.H.

#define DMA_WORDTRANS   (1<<11)
 

Definition at line 153 of file HWAPI.H.

#define GET_FRQ_MAX_BAUD   2
 

Definition at line 125 of file HWAPI.H.

#define GET_FRQ_PROCESSOR   0
 

Definition at line 123 of file HWAPI.H.

#define GET_FRQ_PWD   3
 

Definition at line 126 of file HWAPI.H.

#define GET_FRQ_TIMER   1
 

Definition at line 124 of file HWAPI.H.

Referenced by LCD_SetBrightness().

#define HAL_BLOCK_READ_DATA_BUS   0xA0
 

Definition at line 90 of file HWAPI.H.

Referenced by hal_readblock_bus().

#define HAL_BLOCK_WRITE_DATA_BUS   0xA1
 

Definition at line 91 of file HWAPI.H.

Referenced by hal_writeblock_bus().

#define HAL_GET_DMA_INFO   0xB2
 

Definition at line 94 of file HWAPI.H.

Referenced by hal_get_dma_info().

#define HAL_GET_FREQUENCIES   0x8A
 

Definition at line 83 of file HWAPI.H.

Referenced by hal_get_frequencies().

#define HAL_GET_REBOOT_REASON   0xC2
 

Definition at line 97 of file HWAPI.H.

Referenced by hal_get_reboot_reason().

#define HAL_GET_SET_WATCHDOG_MODE   0x90
 

Definition at line 88 of file HWAPI.H.

Referenced by hal_set_watchdog_mode().

#define HAL_GIVE_EOI   0x8E
 

Definition at line 87 of file HWAPI.H.

Referenced by hal_give_eoi().

#define HAL_INIT_REST_NON_VOLATILE_DATA   0xC0
 

Definition at line 95 of file HWAPI.H.

Referenced by hal_init_restore_non_volatile_data().

#define HAL_INIT_TIMER   0x85
 

Definition at line 78 of file HWAPI.H.

Referenced by hal_init_timer().

#define hal_inportb      inportb(x)
 

Definition at line 129 of file HWAPI.H.

Referenced by IDE_error(), and IDE_status().

#define hal_inportb_block   hal_readblock_bus
 

Definition at line 136 of file HWAPI.H.

#define HAL_INSTALL_ISR   0x84
 

Definition at line 77 of file HWAPI.H.

Referenced by hal_install_isr().

#define HAL_INT   0xA1
 

Definition at line 104 of file HWAPI.H.

Referenced by hal_get_dma_info(), hal_get_frequencies(), hal_get_pio_output_state(), hal_get_reboot_reason(), hal_give_eoi(), hal_init_restore_non_volatile_data(), hal_init_timer(), hal_install_isr(), hal_read_bus(), hal_read_pio(), hal_read_pios(), hal_read_timer_count(), hal_readblock_bus(), hal_refresh_watchdog(), hal_save_non_volatile_data(), hal_set_duty_cycle_waveform(), hal_set_watchdog_mode(), hal_start_dma(), hal_start_timer(), hal_stop_dma(), hal_stop_timer(), hal_write_bus(), hal_write_pio(), hal_write_pios(), hal_write_timer_count(), and hal_writeblock_bus().

#define hal_outportb x,
     outportb(x,y)
 

Definition at line 130 of file HWAPI.H.

Referenced by IDE_command(), IDE_identify(), IDE_LBA_command(), IDE_ReadSRAM(), IDE_reset(), IDE_waitirq(), and IDE_WriteSRAM().

#define hal_outportb_block   hal_writeblock_bus
 

Definition at line 137 of file HWAPI.H.

#define HAL_READ_DATA_BUS   0x80
 

Definition at line 73 of file HWAPI.H.

Referenced by hal_read_bus().

#define HAL_READ_PIO   0x82
 

Definition at line 75 of file HWAPI.H.

Referenced by hal_read_pios().

#define HAL_READ_SPECIFIC_PIO   0x8C
 

Definition at line 85 of file HWAPI.H.

Referenced by hal_read_pio().

#define HAL_READ_TIMER_COUNT   0x88
 

Definition at line 81 of file HWAPI.H.

Referenced by hal_read_timer_count().

#define HAL_REFRESH_WATCHDOG   0x91
 

Definition at line 89 of file HWAPI.H.

Referenced by hal_refresh_watchdog().

#define HAL_SAVE_NON_VOLATILE_DATA   0xC1
 

Definition at line 96 of file HWAPI.H.

Referenced by hal_save_non_volatile_data().

#define HAL_SET_DUTY_CYCLE_WAVEFORM   0x8B
 

Definition at line 84 of file HWAPI.H.

Referenced by hal_set_duty_cycle_waveform().

#define HAL_SET_INT0_VECT   0x10
 

Definition at line 72 of file HWAPI.H.

#define HAL_START_DMA   0xB0
 

Definition at line 92 of file HWAPI.H.

Referenced by hal_start_dma().

#define HAL_START_TIMER   0x86
 

Definition at line 79 of file HWAPI.H.

Referenced by hal_start_timer().

#define HAL_STOP_DMA   0xB1
 

Definition at line 93 of file HWAPI.H.

Referenced by hal_stop_dma().

#define HAL_STOP_TIMER   0x87
 

Definition at line 80 of file HWAPI.H.

Referenced by hal_stop_timer().

#define HAL_WRITE_DATA_BUS   0x81
 

Definition at line 74 of file HWAPI.H.

Referenced by hal_write_bus().

#define HAL_WRITE_PIO   0x83
 

Definition at line 76 of file HWAPI.H.

Referenced by hal_write_pios().

#define HAL_WRITE_SPECIFIC_PIO   0x8D
 

Definition at line 86 of file HWAPI.H.

Referenced by hal_write_pio().

#define HAL_WRITE_TIMER_COUNT   0x89
 

Definition at line 82 of file HWAPI.H.

Referenced by hal_write_timer_count().

#define MAX_RETENTIVE_AREAS   10
 

!!! Has to be passed for the user application !!!!

Definition at line 187 of file HWAPI.H.

#define PFE_ENABLE_DATA_BUS   0x80
 

Definition at line 61 of file HWAPI.H.

Referenced by pfe_enable_bus().

#define PFE_ENABLE_EXTERNAL_DMA   0x88
 

Definition at line 69 of file HWAPI.H.

Referenced by pfe_enable_external_dma().

#define PFE_ENABLE_EXTERNAL_IRQ   0x84
 

Definition at line 65 of file HWAPI.H.

Referenced by pfe_enable_int().

#define PFE_ENABLE_EXTERNAL_TIMER   0x85
 

Definition at line 66 of file HWAPI.H.

Referenced by pfe_enable_timer().

#define PFE_ENABLE_INT_CASCADE_MODE   0x89
 

Definition at line 70 of file HWAPI.H.

Referenced by pfe_enable_int_cascade_mode().

#define PFE_ENABLE_NON_MULTI_ADDR_BUS   0x81
 

Definition at line 62 of file HWAPI.H.

Referenced by pfe_enable_adr().

#define PFE_ENABLE_PCS   0x83
 

Definition at line 64 of file HWAPI.H.

Referenced by pfe_enable_pcs().

#define PFE_ENABLE_PIO   0x82
 

Definition at line 63 of file HWAPI.H.

Referenced by hal_get_pio_output_state(), pfe_enable_pio(), and pfe_get_pio_state().

#define PFE_ENABLE_PWD   0x87
 

Definition at line 68 of file HWAPI.H.

Referenced by pfe_enable_pwd().

#define PFE_INT   0xA2
 

Definition at line 103 of file HWAPI.H.

Referenced by pfe_enable_adr(), pfe_enable_bus(), pfe_enable_external_dma(), pfe_enable_int(), pfe_enable_int_cascade_mode(), pfe_enable_pcs(), pfe_enable_pio(), pfe_enable_pwd(), pfe_enable_timer(), pfe_get_pio_state(), and pfe_set_edge_level_intr_mode().

#define PFE_SET_EDGE_LEVEL_INTR_MODE   0x86
 

Definition at line 67 of file HWAPI.H.

Referenced by pfe_set_edge_level_intr_mode().

#define PIO_I   1
 

Definition at line 113 of file HWAPI.H.

#define PIO_IPD   3
 

Definition at line 115 of file HWAPI.H.

Referenced by AMD_TestPios(), and LCD_Done().

#define PIO_IPU   2
 

Definition at line 114 of file HWAPI.H.

Referenced by AMD_TestPios(), LCD_Done(), and VS_Init().

#define PIO_O0   5
 

Definition at line 117 of file HWAPI.H.

Referenced by AMD_TestPios(), and VS_Init().

#define PIO_O1   4
 

Definition at line 116 of file HWAPI.H.

Referenced by VS_Init().


Typedef Documentation

typedef void interrupt(* InterruptHandler)(void)
 

Definition at line 39 of file HWAPI.H.

Referenced by hal_install_isr().

typedef struct _REMOP Remop
 


Function Documentation

int hal_get_dma_info unsigned char    channel,
Dma_Info   dmaInfo
 

Definition at line 549 of file HWAPI.C.

References Dma_Info::count, Dma_Info::ctrl_reg, Dma_Info::dest, DMA_DESTMEM, DMA_SRCMEM, HAL_GET_DMA_INFO, HAL_INT, Dma_Info::src, and src.

unsigned long hal_get_frequencies unsigned char    frq
 

Definition at line 445 of file HWAPI.C.

References HAL_GET_FREQUENCIES, and HAL_INT.

Referenced by LCD_SetBrightness().

void hal_get_pio_output_state unsigned *    pins,
unsigned    wOut
 

Definition at line 193 of file HWAPI.C.

References HAL_INT, and PFE_ENABLE_PIO.

int hal_get_reboot_reason void   
 

Definition at line 619 of file HWAPI.C.

References HAL_GET_REBOOT_REASON, and HAL_INT.

void hal_give_eoi unsigned char    intr_no
 

Definition at line 480 of file HWAPI.C.

References HAL_GIVE_EOI, and HAL_INT.

int hal_init_non_volatile_data Remop   remop
 

void hal_init_timer unsigned char    timer,
unsigned    mode,
unsigned    divider
 

Definition at line 353 of file HWAPI.C.

References HAL_INIT_TIMER, and HAL_INT.

Referenced by LCD_SetBrightness().

InterruptHandler hal_install_isr unsigned    irq,
unsigned    count,
InterruptHandler    handler
 

Definition at line 331 of file HWAPI.C.

References HAL_INSTALL_ISR, HAL_INT, and InterruptHandler.

unsigned char hal_read_bus unsigned    adr,
unsigned    wAND,
unsigned    wXOR
 

Definition at line 211 of file HWAPI.C.

References HAL_INT, and HAL_READ_DATA_BUS.

unsigned char hal_read_pio unsigned char    pio
 

Definition at line 304 of file HWAPI.C.

References HAL_INT, and HAL_READ_SPECIFIC_PIO.

unsigned hal_read_pios unsigned    wAND,
unsigned    wXOR
 

Definition at line 274 of file HWAPI.C.

References HAL_INT, and HAL_READ_PIO.

unsigned hal_read_timer_count unsigned char    timer,
unsigned far *    maxcount
 

Definition at line 388 of file HWAPI.C.

References HAL_INT, and HAL_READ_TIMER_COUNT.

void hal_readblock_bus unsigned    adr0,
unsigned    adr1,
unsigned char *    buf,
unsigned    cnt
 

Definition at line 244 of file HWAPI.C.

References HAL_BLOCK_READ_DATA_BUS, and HAL_INT.

void hal_refresh_watchdog void   
 

Definition at line 434 of file HWAPI.C.

References HAL_INT, and HAL_REFRESH_WATCHDOG.

void hal_save_non_volatile_data void   
 

Definition at line 609 of file HWAPI.C.

References HAL_INT, and HAL_SAVE_NON_VOLATILE_DATA.

void hal_set_duty_cycle_waveform unsigned char    timer,
int    mode,
unsigned    clock_divider
 

Definition at line 464 of file HWAPI.C.

References HAL_INT, and HAL_SET_DUTY_CYCLE_WAVEFORM.

Referenced by LCD_SetBrightness().

unsigned char hal_set_watchdog_mode unsigned char    mode
 

Definition at line 418 of file HWAPI.C.

References HAL_GET_SET_WATCHDOG_MODE, and HAL_INT.

void hal_start_dma unsigned char    channel,
Dma_Info   dmaInfo
 

Definition at line 493 of file HWAPI.C.

References Dma_Info::count, Dma_Info::ctrl_reg, Dma_Info::dest, DMA_DESTMEM, DMA_SRCMEM, HAL_INT, HAL_START_DMA, Dma_Info::src, and src.

void hal_start_timer unsigned char    timer
 

Definition at line 366 of file HWAPI.C.

References HAL_INT, and HAL_START_TIMER.

Referenced by LCD_SetBrightness().

int hal_stop_dma unsigned char    channel
 

Definition at line 534 of file HWAPI.C.

References HAL_INT, and HAL_STOP_DMA.

void hal_stop_timer unsigned char    timer
 

Definition at line 377 of file HWAPI.C.

References HAL_INT, and HAL_STOP_TIMER.

Referenced by LCD_Done().

void hal_write_bus unsigned    adr,
unsigned char    value,
unsigned    wAND,
unsigned    wXOR
 

Definition at line 229 of file HWAPI.C.

References HAL_INT, and HAL_WRITE_DATA_BUS.

void hal_write_pio unsigned char    pio,
unsigned    value
 

Definition at line 320 of file HWAPI.C.

References HAL_INT, and HAL_WRITE_SPECIFIC_PIO.

void hal_write_pios unsigned    value,
unsigned    wAND,
unsigned    wXOR
 

Definition at line 291 of file HWAPI.C.

References HAL_INT, and HAL_WRITE_PIO.

void hal_write_timer_count unsigned char    timer,
unsigned    counter
 

Definition at line 406 of file HWAPI.C.

References HAL_INT, and HAL_WRITE_TIMER_COUNT.

void hal_writeblock_bus unsigned    adr0,
unsigned    adr1,
unsigned char *    buf,
unsigned    cnt
 

Definition at line 259 of file HWAPI.C.

References HAL_BLOCK_WRITE_DATA_BUS, and HAL_INT.

void pfe_enable_adr unsigned char    adr
 

Definition at line 59 of file HWAPI.C.

References PFE_ENABLE_NON_MULTI_ADDR_BUS, and PFE_INT.

void pfe_enable_bus unsigned    mask,
unsigned char    ale
 

Definition at line 47 of file HWAPI.C.

References PFE_ENABLE_DATA_BUS, and PFE_INT.

Referenced by LCD_Init(), RC_Init(), and VS_Init().

int pfe_enable_external_dma unsigned char    channel
 

Definition at line 132 of file HWAPI.C.

References PFE_ENABLE_EXTERNAL_DMA, and PFE_INT.

void pfe_enable_int unsigned char    irq
 

Definition at line 85 of file HWAPI.C.

References PFE_ENABLE_EXTERNAL_IRQ, and PFE_INT.

void pfe_enable_int_cascade_mode void   
 

Definition at line 148 of file HWAPI.C.

References PFE_ENABLE_INT_CASCADE_MODE, and PFE_INT.

void pfe_enable_pcs unsigned char    pcs
 

Definition at line 72 of file HWAPI.C.

References PFE_ENABLE_PCS, and PFE_INT.

Referenced by LCD_Init(), RC_Init(), and VS_Init().

void pfe_enable_pio unsigned    pio,
unsigned char    mode
 

Definition at line 160 of file HWAPI.C.

References PFE_ENABLE_PIO, and PFE_INT.

Referenced by AMD_TestPios(), LCD_Done(), and VS_Init().

void pfe_enable_pwd void   
 

Definition at line 122 of file HWAPI.C.

References PFE_ENABLE_PWD, and PFE_INT.

void pfe_enable_timer unsigned    mode
 

Definition at line 98 of file HWAPI.C.

References PFE_ENABLE_EXTERNAL_TIMER, and PFE_INT.

Referenced by LCD_Init().

void pfe_get_pio_state unsigned *    wPio,
unsigned *    wInp,
unsigned *    wOut
 

Definition at line 174 of file HWAPI.C.

References PFE_ENABLE_PIO, and PFE_INT.

void pfe_set_edge_level_intr_mode unsigned char    mode,
unsigned    mask
 

Definition at line 109 of file HWAPI.C.

References PFE_INT, and PFE_SET_EDGE_LEVEL_INTR_MODE.


Generated on Sun Aug 4 21:47:32 2002 for k/os mp3v2 by doxygen1.2.16