MLC interface driver
|
Source code of MLC driver. More...
#include "platform.h"
#include "MLC_drv.h"
#include <stdint.h>
#include <stdio.h>
#include "DSP2833x_Device.h"
#include "DSP2833x_Examples.h"
#include "DSP281x_Device.h"
#include "DSP281x_Examples.h"
#include "emif.h"
#include "sys_common.h"
#include "system.h"
#include "het.h"
#include "gio.h"
#include "spi.h"
#include "sys_vim.h"
#include "sys_dma.h"
Go to the source code of this file.
Macros | |
#define | PIN_STARTCONVA (uint32)(1U << 21U) |
#define | PIN_STARTCONVB (uint32)(1U << 20U) |
#define | PIN_STARTCONVC (uint32)(1U << 22U) |
#define | READ_ADC_ALL 0xFF |
#define | MLC_READ_32(addr) *((volatile uint32_t*)BASE_ADDRESS+addr) |
#define | AD_LEN 16 |
#define | TMS570LS3137_CLK 180000000 |
#define | DELAY_1US 13 |
Functions | |
interrupt void | isr_conv_end (void) |
void | dmaConfigCtrlPacket (uint32 sadd, uint32 dadd, uint32 dsize) |
void | gio_isr_handler (void) |
interrupt void | dma_transfer_end (void) |
void | DELAY_US (float us) |
void | MLC_init_F28335 (void) |
void | MLC_init_F2812 (void) |
void | MLC_init_LS3137 (void) |
void | MLC_init (void) |
void | MLC_global_enable () |
void | MLC_global_disable () |
uint16_t | MLC_DMA_active () |
void | MLC_DMA_activate () |
void | MLC_DMA_deactivate () |
void | MLC_DMA_enable_isr (uint16_t channel, interrupt void *handler) |
void | MLC_DMA_disable_isr (uint16_t channel) |
void | MLC_ADC_enable_isr (interrupt void *handler) |
void | MLC_ADC_disable_isr (void) |
void | MLC_ADC_reset (void) |
void | MLC_ADC_start_conv (void) |
void | MLC_ADC_start_one_conv (uint16_t channel) |
void | MLC_ADC_setup (unsigned int os_1, unsigned int os_2, unsigned int os_3, unsigned int rng_1, unsigned int rng_2, unsigned int rng_3) |
unsigned int | MLC_ADC_wait (void) |
volatile int16_t * | MLC_ADC_read (volatile int16_t *ad_res, uint16_t ad_addr) |
volatile int16_t * | MLC_ADC1_get_res_ptr (void) |
volatile int16_t * | MLC_ADC2_get_res_ptr (void) |
volatile int16_t * | MLC_ADC3_get_res_ptr (void) |
volatile mlc_adc_result * | MLC_ADC1_get_res_strptr (void) |
volatile mlc_adc_result * | MLC_ADC2_get_res_strptr (void) |
volatile mlc_adc_result * | MLC_ADC3_get_res_strptr (void) |
volatile int16_t * | MLC_ADC1_read (void) |
volatile int16_t * | MLC_ADC2_read (void) |
volatile int16_t * | MLC_ADC3_read (void) |
float | MLC_ADC_calc_volt (int16_t value, uint16_t range) |
void | MLC_LCD_write_to (uint16_t pos, char chr) |
void | MLC_LCD_write_str (char *pStr, uint16_t pos) |
void | MLC_LCD_clrscr (void) |
void | MLC_ADC_setup_SOC (uint16_t adsoc) |
void | MLC_DAC_init (void) |
void | MLC_DAC_control (uint16_t cmd) |
void | MLC_DAC_reset (void) |
void | MLC_DAC_write (uint16_t count) |
void | MLC_SCI_init (unsigned long int baudrate) |
char | MLC_SCI_char_avail (void) |
char | MLC_SCI_wait_send (void) |
char | MLC_SCI_recv_char (void) |
void | MLC_SCI_send_char (char c) |
void | MLC_SCI_send_char_wait (char c) |
void | MLC_SCI_send_str (char *str) |
void | MLC_PWR_on (uint16_t pwr) |
void | MLC_PWR_off (uint16_t pwr) |
void | MLC_DBG_set (uint16_t dbg) |
void | MLC_DBG_clear (uint16_t dbg) |
Variables | |
volatile int16_t | AD_dma_res_1 [16] |
volatile int16_t | AD_dma_res_2 [16] |
volatile int16_t | AD_dma_res_3 [16] |
t_isrFuncPTR | adc_convend_handler |
g_dmaCTRL | g_dmaCTRLPKT |
spiDAT1_t | spi2_conf |
volatile int16_t * | AD_res_1 = AD_dma_res_1 |
volatile int16_t * | AD_res_2 = AD_dma_res_2 |
volatile int16_t * | AD_res_3 = AD_dma_res_3 |
volatile mlc_adc_result * | AD_res_1_struct = (mlc_adc_result*) AD_dma_res_1 |
volatile mlc_adc_result * | AD_res_2_struct = (mlc_adc_result*) AD_dma_res_2 |
volatile mlc_adc_result * | AD_res_3_struct = (mlc_adc_result*) AD_dma_res_3 |
uint16_t | dac_values [8] |
uint16_t | dac_sel_ch [8] |
volatile uint16_t | pwr_out_state = 0 |
volatile uint16_t | dbg_state = 0 |
volatile int | temp |
mlc_info_t | MLC_info_struct |
mlc_info_t * | pMLC_info_struct = &MLC_info_struct |
uint16_t | ad_conf = 0 |
uint16_t | ad_soc_conf = 0 |
Source code of MLC driver.
This file implements driver for memory mapped peripherals on MLC interface.
Definition in file MLC_drv.c.
void dmaConfigCtrlPacket | ( | uint32 | sadd, |
uint32 | dadd, | ||
uint32 | dsize | ||
) |
void dmaConfigCtrlPacket(uint32 sadd,uint32 dadd,uint32 dsize)
configuring dma control packet stack
sadd > source address dadd > destination address dsize > data size
@ note : after configuring the stack the control packet needs to be set by calling dmaSetCtrlPacket()
Definition at line 162 of file MLC_drv.c.
Referenced by MLC_DMA_enable_isr().