Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
2.4 KiB

  1. /******************************************************************************\
  2. * *
  3. * FPGA.H - FPGA support. *
  4. * *
  5. * Copyright (c) C-Cube Microsystems 1996 *
  6. * All Rights Reserved. *
  7. * *
  8. * Use of C-Cube Microsystems code is governed by terms and conditions *
  9. * stated in the accompanying licensing statement. *
  10. * *
  11. \******************************************************************************/
  12. #ifndef _FPGA_H_
  13. #define _FPGA_H_
  14. //-------------------------------------------------------------------
  15. // FPGA BITS DEFINITION
  16. //-------------------------------------------------------------------
  17. #if defined(OVATION)
  18. #define FPGA_I2C_CLOCK 0x01
  19. #define FPGA_I2C_DATA 0x02
  20. #define FPGA_I2C_DIRECTION 0x04
  21. #define FPGA_AUDIO_CS 0x08
  22. #define FPGA_SECTOR_START 0x10
  23. #define FPGA_DECRIPTION_BYPASS 0x20
  24. #define FPGA_BUS_MASTER 0x40
  25. #define FPGA_GP_OUTPUT 0x80
  26. #define FPGA_FORCE_BM 0x0100
  27. #endif // OVATION
  28. #if defined(ENCORE)
  29. /* These are for the Creative board */
  30. #define ZIVA_NO_RESET 0x1 // 0 Reset 1 Normal
  31. #define CP_NO_RESET 0x2 // Ditto
  32. #define RESERVED 0x4
  33. #define DMA_NO_RESET 0x8 // Ditto
  34. /* The BGNI is the same with FPGA_SECTOR_START */
  35. #define BGNI_ON 0x10 // 1 BGNI count on
  36. #define FPGA_SECTOR_START 0x10
  37. #define FPGA_STATE_MACHINE 0x20 // 1 On 0 Off
  38. #define ZIVA_INT 0x40 // 0 Enable 1 Disable
  39. #define AUDIO_STROBE 0x80 // 0 Select 1 Not-Select
  40. // Version control
  41. #define FPGA_VERSION 0x0C // bits 2 and 3 are version control bits
  42. #define FPGA_VERSION_1_0 0x0C
  43. #define FPGA_VERSION_2_0 0x04
  44. #endif // ENCORE
  45. BOOL FPGA_Init( DWORD dwFPGABase );
  46. void FPGA_Set( WORD wMask );
  47. void FPGA_Clear( WORD wMask );
  48. void FPGA_Write( WORD wData );
  49. WORD FPGA_Read();
  50. #ifndef LOBYTE
  51. #define LOBYTE(w) ((BYTE)(w))
  52. #define HIBYTE(w) ((BYTE)(((WORD)(w) >> 8) & 0xFF))
  53. #endif
  54. #endif // _FPGA_H_