OpenNSL API Guide and Reference Manual
Macros | Functions
pci.h File Reference
#include <stdint.h>

Go to the source code of this file.

Macros

#define OPENNSL_CMIC_LED_DATA_RAM_SIZE   0x100
 
#define OPENNSL_CMIC_LED_PROGRAM_RAM_SIZE   0x100
 
#define OPENNSL_CMIC_LED_REG_SIZE   4
 
#define OPENNSL_CMIC_LEDUP0_CTRL_OFFSET   0x20000
 
#define OPENNSL_CMIC_LEDUP0_DATA_RAM_OFFSET   0x20400
 
#define OPENNSL_CMIC_LEDUP0_PROGRAM_RAM_OFFSET   0x20800
 
#define OPENNSL_CMIC_LEDUP0_STATUS_OFFSET   0x20004
 
#define OPENNSL_CMIC_LEDUP1_CTRL_OFFSET   0x21000
 
#define OPENNSL_CMIC_LEDUP1_DATA_RAM_OFFSET   0x21400
 
#define OPENNSL_CMIC_LEDUP1_PROGRAM_RAM_OFFSET   0x21800
 
#define OPENNSL_CMIC_LEDUP1_STATUS_OFFSET   0x21004
 
#define OPENNSL_CMIC_MMU_COSLC_COUNT_ADDR   10341
 
#define OPENNSL_CMIC_MMU_COSLC_COUNT_DATA   10342
 
#define OPENNSL_LC_LED_ENABLE   0x1
 

Functions

uint32_t opennsl_pci_read (int unit, uint32_t addr)
 Function to read from the PCI.
 
int opennsl_pci_write (int unit, uint32_t addr, uint32_t data)
 Function to write to the PCI.
 

Macro Definition Documentation

#define OPENNSL_CMIC_LED_DATA_RAM_SIZE   0x100

Definition at line 54 of file pci.h.

Referenced by main().

#define OPENNSL_CMIC_LED_PROGRAM_RAM_SIZE   0x100

Definition at line 55 of file pci.h.

Referenced by main().

#define OPENNSL_CMIC_LED_REG_SIZE   4

Definition at line 56 of file pci.h.

Referenced by main().

#define OPENNSL_CMIC_LEDUP0_CTRL_OFFSET   0x20000

Definition at line 57 of file pci.h.

#define OPENNSL_CMIC_LEDUP0_DATA_RAM_OFFSET   0x20400

Definition at line 59 of file pci.h.

#define OPENNSL_CMIC_LEDUP0_PROGRAM_RAM_OFFSET   0x20800

Definition at line 60 of file pci.h.

#define OPENNSL_CMIC_LEDUP0_STATUS_OFFSET   0x20004

Definition at line 58 of file pci.h.

#define OPENNSL_CMIC_LEDUP1_CTRL_OFFSET   0x21000

Definition at line 61 of file pci.h.

#define OPENNSL_CMIC_LEDUP1_DATA_RAM_OFFSET   0x21400

Definition at line 63 of file pci.h.

#define OPENNSL_CMIC_LEDUP1_PROGRAM_RAM_OFFSET   0x21800

Definition at line 64 of file pci.h.

#define OPENNSL_CMIC_LEDUP1_STATUS_OFFSET   0x21004

Definition at line 62 of file pci.h.

#define OPENNSL_CMIC_MMU_COSLC_COUNT_ADDR   10341

Definition at line 65 of file pci.h.

#define OPENNSL_CMIC_MMU_COSLC_COUNT_DATA   10342

Definition at line 66 of file pci.h.

#define OPENNSL_LC_LED_ENABLE   0x1

Definition at line 68 of file pci.h.

Referenced by main().

Function Documentation

uint32_t opennsl_pci_read ( int  unit,
uint32_t  addr 
)

Function to read from the PCI.

Parameters
unit[IN] The switch unit number addr [IN] PCI address to read from
Returns
OPENNSL_E_XXX OpenNSL API return code

Referenced by main().

int opennsl_pci_write ( int  unit,
uint32_t  addr,
uint32_t  data 
)

Function to write to the PCI.

Parameters
unit[IN] The switch unit number addr [IN] PCI address to write to data [IN] Data value to write into PCI
Returns
OPENNSL_E_XXX OpenNSL API return code

Referenced by main().