Versão limpa em 04/09/2014. Telnet funcionando.

Dependencies:   EthernetInterface mbed-rtos mbed NTPClient

Committer:
rebonatto
Date:
Mon Jan 18 18:26:03 2016 +0000
Revision:
43:69afea5f5a4d
Parent:
0:66d8bd1f9d4c
Aquisi??o sem DMA, 256 amostras.; Buffer simples com  copia de buffer para calculo da FFT.; Com telnetr e TFTP ativos. Telnet funcionando sem travar.; Vers?o com WhatDog.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
rebonatto 0:66d8bd1f9d4c 1 /*
rebonatto 0:66d8bd1f9d4c 2 * dma.h
rebonatto 0:66d8bd1f9d4c 3 *
rebonatto 0:66d8bd1f9d4c 4 * Created on: 03/07/2011
rebonatto 0:66d8bd1f9d4c 5 * Author: francisco
rebonatto 0:66d8bd1f9d4c 6 */
rebonatto 0:66d8bd1f9d4c 7 #ifndef DMA_H
rebonatto 0:66d8bd1f9d4c 8 #define DMA_H
rebonatto 0:66d8bd1f9d4c 9
rebonatto 0:66d8bd1f9d4c 10 #define DMA_MEMORY -1
rebonatto 0:66d8bd1f9d4c 11
rebonatto 0:66d8bd1f9d4c 12 #define DMA_PERIPHERAL_SSP0_TX 0U
rebonatto 0:66d8bd1f9d4c 13 #define DMA_PERIPHERAL_SSP0_RX 1U
rebonatto 0:66d8bd1f9d4c 14 #define DMA_PERIPHERAL_SSP1_TX 2U
rebonatto 0:66d8bd1f9d4c 15 #define DMA_PERIPHERAL_SSP1_RX 3U
rebonatto 0:66d8bd1f9d4c 16 #define DMA_PERIPHERAL_ADC 4U
rebonatto 0:66d8bd1f9d4c 17 #define DMA_PERIPHERAL_I2S0 5U
rebonatto 0:66d8bd1f9d4c 18 #define DMA_PERIPHERAL_I2S1 6U
rebonatto 0:66d8bd1f9d4c 19 #define DMA_PERIPHERAL_DAC 7U
rebonatto 0:66d8bd1f9d4c 20 #define DMA_PERIPHERAL_UART0_TX 8U
rebonatto 0:66d8bd1f9d4c 21 #define DMA_PERIPHERAL_UART0_RX 9U
rebonatto 0:66d8bd1f9d4c 22 #define DMA_PERIPHERAL_UART1_TX 10U
rebonatto 0:66d8bd1f9d4c 23 #define DMA_PERIPHERAL_UART1_RX 11U
rebonatto 0:66d8bd1f9d4c 24 #define DMA_PERIPHERAL_UART2_TX 12U
rebonatto 0:66d8bd1f9d4c 25 #define DMA_PERIPHERAL_UART2_RX 13U
rebonatto 0:66d8bd1f9d4c 26 #define DMA_PERIPHERAL_UART3_TX 14U
rebonatto 0:66d8bd1f9d4c 27 #define DMA_PERIPHERAL_UART3_RX 15U
rebonatto 0:66d8bd1f9d4c 28
rebonatto 0:66d8bd1f9d4c 29 #define DMA_MEMORY_TO_MEMORY 0U
rebonatto 0:66d8bd1f9d4c 30 #define DMA_MEMORY_TO_PERIPHERAL 1U
rebonatto 0:66d8bd1f9d4c 31 #define DMA_PERIPHERAL_TO_MEMORY 2U
rebonatto 0:66d8bd1f9d4c 32 #define DMA_PERIPHERAL_TO_PERIPHERAL 3U
rebonatto 0:66d8bd1f9d4c 33
rebonatto 0:66d8bd1f9d4c 34 #define DMA_DEST_SIZE(n) (n<<15)
rebonatto 0:66d8bd1f9d4c 35 #define DMA_SRC_SIZE(n) (n<<12)
rebonatto 0:66d8bd1f9d4c 36
rebonatto 0:66d8bd1f9d4c 37 #define DMA_SRC_WIDTH_BYTE (0U<<18)
rebonatto 0:66d8bd1f9d4c 38 #define DMA_SRC_WIDTH_HALFWORD (1U<<18)
rebonatto 0:66d8bd1f9d4c 39 #define DMA_SRC_WIDTH_WORD (2U<<18)
rebonatto 0:66d8bd1f9d4c 40
rebonatto 0:66d8bd1f9d4c 41 #define DMA_DST_WIDTH_BYTE (0U<<21)
rebonatto 0:66d8bd1f9d4c 42 #define DMA_DST_WIDTH_HALFWORD (1U<<21)
rebonatto 0:66d8bd1f9d4c 43 #define DMA_DST_WIDTH_WORD (2U<<21)
rebonatto 0:66d8bd1f9d4c 44
rebonatto 0:66d8bd1f9d4c 45 #define DMA_SRC_INCREMENT (1U<<26)
rebonatto 0:66d8bd1f9d4c 46 #define DMA_DST_INCREMENT (1U<<27)
rebonatto 0:66d8bd1f9d4c 47
rebonatto 0:66d8bd1f9d4c 48 #define DMA_TC_INT (1U<<31)
rebonatto 0:66d8bd1f9d4c 49
rebonatto 0:66d8bd1f9d4c 50 #ifdef __cplusplus
rebonatto 0:66d8bd1f9d4c 51 extern "C" {
rebonatto 0:66d8bd1f9d4c 52 #endif
rebonatto 0:66d8bd1f9d4c 53
rebonatto 0:66d8bd1f9d4c 54 typedef struct
rebonatto 0:66d8bd1f9d4c 55 {
rebonatto 0:66d8bd1f9d4c 56 unsigned long int sourceAddr;
rebonatto 0:66d8bd1f9d4c 57 unsigned long int destAddr;
rebonatto 0:66d8bd1f9d4c 58 unsigned long int nextNode;
rebonatto 0:66d8bd1f9d4c 59 unsigned long int dmaControl;
rebonatto 0:66d8bd1f9d4c 60 } dmaLinkedListNode;
rebonatto 0:66d8bd1f9d4c 61
rebonatto 0:66d8bd1f9d4c 62 extern void init_dma(void);
rebonatto 0:66d8bd1f9d4c 63 extern void setup_channel(dmaLinkedListNode* pList,int ch,int src,int dst);
rebonatto 0:66d8bd1f9d4c 64 extern void stop_channel(void);
rebonatto 0:66d8bd1f9d4c 65
rebonatto 0:66d8bd1f9d4c 66 #ifdef __cplusplus
rebonatto 0:66d8bd1f9d4c 67 }
rebonatto 0:66d8bd1f9d4c 68 #endif
rebonatto 0:66d8bd1f9d4c 69
rebonatto 0:66d8bd1f9d4c 70 #endif //#define DMA_H