#include "xbasic_types.h"
#include "xstatus.h"
#include "xil_io.h"
Go to the source code of this file.
#define AXI_MILLBRAE_mReadReg |
( |
|
BaseAddress, |
|
|
|
RegOffset |
|
) |
| Xil_In32((BaseAddress) + (RegOffset)) |
Read a value from a AXI_MILLBRAE register. A 32 bit read is performed. If the component is implemented in a smaller width, only the least significant data is read from the register. The most significant data will be read as 0.
- Parameters
-
BaseAddress | is the base address of the AXI_MILLBRAE device. |
RegOffset | is the register offset from the base to write to. |
- Returns
- Data is the data from the register.
- Note
- C-style signature: Xuint32 AXI_MILLBRAE_mReadReg(Xuint32 BaseAddress, unsigned RegOffset)
Definition at line 130 of file axi_millbrae.h.
#define AXI_MILLBRAE_mWriteReg |
( |
|
BaseAddress, |
|
|
|
RegOffset, |
|
|
|
Data |
|
) |
| Xil_Out32((BaseAddress) + (RegOffset), (Xuint32)(Data)) |
Write a value to a AXI_MILLBRAE register. A 32 bit write is performed. If the component is implemented in a smaller width, only the least significant data is written.
- Parameters
-
BaseAddress | is the base address of the AXI_MILLBRAE device. |
RegOffset | is the register offset from the base to write to. |
Data | is the data written to the register. |
- Returns
- None.
- Note
- C-style signature: void AXI_MILLBRAE_mWriteReg(Xuint32 BaseAddress, unsigned RegOffset, Xuint32 Data)
Definition at line 110 of file axi_millbrae.h.
#define AXI_MILLBRAE_USER_SLV_SPACE_OFFSET (0x00000000) |
void AXI_MILLBRAE_Config_ADC |
( |
u32 |
BaseAddress, |
|
|
u32 |
Value |
|
) |
| |
Config ADC.
- Details
- This function write a value to the config register of the ADC
- Parameters
-
[in] | BaseAddress | - Base address of the AXI_MILLBRAE IP core |
- Return values
-
Definition at line 66 of file axi_millbrae.c.
void AXI_MILLBRAE_Config_DAC |
( |
u32 |
BaseAddress, |
|
|
u32 |
Value |
|
) |
| |
Config DAC.
- Details
- This function write a value to the config register of the DAC
- Parameters
-
[in] | BaseAddress | - Base address of the AXI_MILLBRAE IP core |
- Return values
-
Definition at line 81 of file axi_millbrae.c.
void AXI_MILLBRAE_Interrupt_Disable |
( |
u32 |
BaseAddress | ) |
|
Disable the interrupt.
- Details
- This function writes a 0 to the interrupt enable register to disable the interrupt
- Parameters
-
[in] | BaseAddress | - Base address of the AXI_MILLBRAE IP core |
- Return values
-
Definition at line 183 of file axi_millbrae.c.
void AXI_MILLBRAE_Interrupt_Enable |
( |
u32 |
BaseAddress | ) |
|
Enable the interrupt.
- Details
- This function writes a 1 to the interrupt enable register to enable the interrupt. When the interrupt is enabled, the AXI_MILLBRAE IP core will raise an interrupt when the sampled data is available.
- Parameters
-
[in] | BaseAddress | - Base address of the AXI_MILLBRAE IP core |
- Return values
-
Definition at line 166 of file axi_millbrae.c.
u32 AXI_MILLBRAE_Read_Data |
( |
u32 |
BaseAddress, |
|
|
u8 |
Channel |
|
) |
| |
Read sampled data.
- Details
- This function reads the ADC sampled data register. The data register will be overwritten when the new sampled data is available.
- Parameters
-
[in] | BaseAddress | - Base address of the AXI_MILLBRAE IP core |
- Return values
-
Definition at line 198 of file axi_millbrae.c.
u32 AXI_MILLBRAE_Read_Interrupt_Status |
( |
u32 |
BaseAddress | ) |
|
Read interrupt status.
- Details
- This function reads the interrupt status register. When the value is one, sampled data is available in the data register. Interrupt status register is a clear-on-read register
- Parameters
-
[in] | BaseAddress | - Base address of the AXI_MILLBRAE IP core |
- Return values
-
Definition at line 214 of file axi_millbrae.c.
void AXI_MILLBRAE_Single_Convert |
( |
u32 |
BaseAddress, |
|
|
u8 |
Channel, |
|
|
u16 * |
uSample |
|
) |
| |
Read one ADC sample.
- Details
- This function starts an ADC conversion and returns one ADC sample.
- Parameters
-
[in] | BaseAddress | - Base address of the AXI_MILLBRAE IP core |
- Return values
-
Definition at line 231 of file axi_millbrae.c.
void AXI_MILLBRAE_Start_Conversion |
( |
u32 |
BaseAddress | ) |
|
Start ADC Conversion.
- Details
- This function writes a 0 to the Mode register of the AXI_MILLBRAE ip core to set the operation mode to ADC conversion mode This function also write a 1 to the start operation register of the AXI_MILLBRAE ip core to start the conversion
- Parameters
-
[in] | BaseAddress | - Base address of the AXI_MILLBRAE IP core |
- Return values
-
Definition at line 96 of file axi_millbrae.c.
void AXI_MILLBRAE_Start_Replication |
( |
u32 |
BaseAddress | ) |
|
Start signal replication.
- Details
- This function writes a 1 to the Mode register of the AXI_MILLBRAE ip core to set the operation mode to signal replication mode This function also write a 1 to the start operation register of the AXI_MILLBRAE ip core to start the signal replication
- Parameters
-
[in] | BaseAddress | - Base address of the AXI_MILLBRAE IP core |
- Return values
-
Definition at line 129 of file axi_millbrae.c.
void AXI_MILLBRAE_Stop_Operation |
( |
u32 |
BaseAddress | ) |
|
Stop operation.
- Details
- This function writes a 0 to the start operation register of the AXI_MILLBRAE ip core to stop the operation
- Parameters
-
[in] | BaseAddress | - Base address of the AXI_MILLBRAE IP core |
- Return values
-
Definition at line 114 of file axi_millbrae.c.
void AXI_MILLBRAE_Write_Timer_Reg |
( |
u32 |
BaseAddress, |
|
|
u32 |
Value |
|
) |
| |
Write Value to the Timer register.
- Details
- This function writes a value to the timer register. The timer register is used to control the sampling rate Sampling rate = 50000000/(Value+1)
- Parameters
-
[in] | BaseAddress | - Base address of the AXI_MILLBRAE IP core |
[in] | Value | - a value to be written to the timer register |
- Return values
-
Definition at line 149 of file axi_millbrae.c.