]> git.sur5r.net Git - freertos/commitdiff
Commit the new files required for the ACE driver in the SmartFusion demo.
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Fri, 29 Apr 2011 13:02:19 +0000 (13:02 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Fri, 29 Apr 2011 13:02:19 +0000 (13:02 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1404 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

Demo/CORTEX_A2F200_SoftConsole/MicroSemi_Code/drivers_config/mss_ace/ace_config.c [new file with mode: 0644]
Demo/CORTEX_A2F200_SoftConsole/MicroSemi_Code/drivers_config/mss_ace/ace_config.h [new file with mode: 0644]
Demo/CORTEX_A2F200_SoftConsole/MicroSemi_Code/drivers_config/mss_ace/ace_handles.h [new file with mode: 0644]

diff --git a/Demo/CORTEX_A2F200_SoftConsole/MicroSemi_Code/drivers_config/mss_ace/ace_config.c b/Demo/CORTEX_A2F200_SoftConsole/MicroSemi_Code/drivers_config/mss_ace/ace_config.c
new file mode 100644 (file)
index 0000000..acd2706
--- /dev/null
@@ -0,0 +1,157 @@
+/*****************************************************************************\r
+* (c) Copyright  Actel Corporation. All rights reserved.\r
+*\r
+*ACE configuration .c file\r
+*Created by Actel MSS_ACE Configurator Fri Dec 17 12:12:19 2010\r
+*\r
+*/\r
+\r
+#include "../../drivers/mss_ace/mss_ace_configurator.h"\r
+#include "ace_config.h"\r
+#include "ace_handles.h"\r
+\r
+#include <stdint.h>\r
+\r
+\r
+/*-----------------------------------------------------------------------------\r
+*AB Configuration\r
+*---------------------------------------------------------------------------*/\r
+ace_adc_config_t g_ace_adc_config[ACE_NB_OF_ADC] =\r
+{\r
+       {\r
+        4096,                      /* uint16_t adc_resolution */\r
+        2560                       /* uint16_t va_ref */\r
+       },\r
+       {\r
+        4096,                      /* uint16_t adc_resolution */\r
+        2560                       /* uint16_t va_ref */\r
+       },\r
+       {\r
+        4096,                      /* uint16_t adc_resolution */\r
+        2560                       /* uint16_t va_ref */\r
+       }\r
+};\r
+\r
+/*-----------------------------------------------------------------------------\r
+*Current Monitor Resistor Values\r
+*---------------------------------------------------------------------------*/\r
+const uint32_t g_ace_current_resistors[ACE_NB_OF_CURRENT_MONITORS] =\r
+{\r
+       100000, /*CM0 ( USED AS CURRENT MONITOR ) */\r
+       1,      /*CM1 ( NOT USED AS CURRENT MONITOR ) */\r
+       1,      /*CM2 ( NOT USED AS CURRENT MONITOR ) */\r
+       1,      /*CM3 ( NOT USED AS CURRENT MONITOR ) */\r
+       1       /*CM4 ( NOT USED AS CURRENT MONITOR ) */\r
+};\r
+\r
+/*-----------------------------------------------------------------------------\r
+*Analog Channels\r
+*---------------------------------------------------------------------------*/\r
+/* Names*/\r
+const uint8_t g_ace_channel_0_name[] = "CurrentMonitor_0";\r
+const uint8_t g_ace_channel_1_name[] = "VoltageMonitor_0";\r
+const uint8_t g_ace_channel_2_name[] = "TemperatureMonitor_0";\r
+\r
+/* Number of Flags per Channel*/\r
+#define CHANNEL_0_NB_OF_FLAGS           0\r
+#define CHANNEL_1_NB_OF_FLAGS           0\r
+#define CHANNEL_2_NB_OF_FLAGS           0\r
+\r
+/* Input Channel to Flag Array Association*/\r
+\r
+/* Channel Table*/\r
+ace_channel_desc_t g_ace_channel_desc_table[ACE_NB_OF_INPUT_CHANNELS] =\r
+{\r
+       {\r
+        g_ace_channel_0_name,      /* const uint8_t * p_sz_channel_name */\r
+        CM0,                       /* adc_channel_id_t signal_id; */\r
+        14,                        /* uint16_t signal_ppe_offset */\r
+        CHANNEL_0_NB_OF_FLAGS,     /* uint16_t nb_of_flags */\r
+        0                          /* uint16_t * p_flags_array */\r
+       },\r
+       {\r
+        g_ace_channel_1_name,      /* const uint8_t * p_sz_channel_name */\r
+        TM0,                       /* adc_channel_id_t signal_id; */\r
+        23,                        /* uint16_t signal_ppe_offset */\r
+        CHANNEL_1_NB_OF_FLAGS,     /* uint16_t nb_of_flags */\r
+        0                          /* uint16_t * p_flags_array */\r
+       },\r
+       {\r
+        g_ace_channel_2_name,      /* const uint8_t * p_sz_channel_name */\r
+        TM1,                       /* adc_channel_id_t signal_id; */\r
+        32,                        /* uint16_t signal_ppe_offset */\r
+        CHANNEL_2_NB_OF_FLAGS,     /* uint16_t nb_of_flags */\r
+        0                          /* uint16_t * p_flags_array */\r
+       }\r
+};\r
+\r
+/*-----------------------------------------------------------------------------\r
+*Threshold Flags\r
+*---------------------------------------------------------------------------*/\r
+/* Flag Names*/\r
+/* Flag Table*/\r
+#if ACE_NB_OF_PPE_FLAGS != 0\r
+       ppe_flag_desc_t g_ppe_flags_desc_table[ACE_NB_OF_PPE_FLAGS] =\r
+       {\r
+       };\r
+#endif\r
+\r
+/*-----------------------------------------------------------------------------\r
+*Sequencer Procedures\r
+*---------------------------------------------------------------------------*/\r
+/* Procedure Name and Microcode*/\r
+const uint8_t g_ace_sse_proc_0_name[] = "ADC0_MAIN";\r
+const uint16_t g_ace_sse_proc_0_sequence[] =\r
+{\r
+       0x1705, 0x1601, 0x155c, 0x14c4,\r
+       0x0000, 0x152d, 0x8a0c, 0x1309,\r
+       0x0000, 0x14c3, 0x0000, 0x8a04,\r
+       0x152d, 0x970c, 0x132f, 0x0000,\r
+       0x14c8, 0x0000, 0x9704, 0x1301,\r
+       0x0000, 0x1002\r
+};\r
+\r
+const uint8_t g_ace_sse_proc_1_name[] = "ADC1_MAIN";\r
+const uint16_t g_ace_sse_proc_1_sequence[] =\r
+{\r
+       0x2705, 0x2601, 0x2200\r
+};\r
+\r
+const uint8_t g_ace_sse_proc_2_name[] = "ADC2_MAIN";\r
+const uint16_t g_ace_sse_proc_2_sequence[] =\r
+{\r
+       0x3705, 0x3601, 0x3200\r
+};\r
+\r
+\r
+\r
+/* Procedure Table*/\r
+ace_procedure_desc_t g_sse_sequences_desc_table[ACE_NB_OF_SSE_PROCEDURES] =\r
+{\r
+       {\r
+        g_ace_sse_proc_0_name,                              /* const uint8_t * p_sz_proc_name */\r
+        2,                                                  /* uint16_t sse_loop_pc */\r
+        0,                                                  /* uint16_t sse_load_offset */\r
+        sizeof(g_ace_sse_proc_0_sequence) / sizeof(uint16_t), /* uint16_t sse_ucode_length */\r
+        g_ace_sse_proc_0_sequence,                          /* const uint16_t * sse_ucode */\r
+        0                                                   /* uint8_t sse_pc_id */\r
+       },\r
+       {\r
+        g_ace_sse_proc_1_name,                              /* const uint8_t * p_sz_proc_name */\r
+        24,                                                 /* uint16_t sse_loop_pc */\r
+        22,                                                 /* uint16_t sse_load_offset */\r
+        sizeof(g_ace_sse_proc_1_sequence) / sizeof(uint16_t), /* uint16_t sse_ucode_length */\r
+        g_ace_sse_proc_1_sequence,                          /* const uint16_t * sse_ucode */\r
+        1                                                   /* uint8_t sse_pc_id */\r
+       },\r
+       {\r
+        g_ace_sse_proc_2_name,                              /* const uint8_t * p_sz_proc_name */\r
+        27,                                                 /* uint16_t sse_loop_pc */\r
+        25,                                                 /* uint16_t sse_load_offset */\r
+        sizeof(g_ace_sse_proc_2_sequence) / sizeof(uint16_t), /* uint16_t sse_ucode_length */\r
+        g_ace_sse_proc_2_sequence,                          /* const uint16_t * sse_ucode */\r
+        2                                                   /* uint8_t sse_pc_id */\r
+       }\r
+};\r
+\r
+\r
diff --git a/Demo/CORTEX_A2F200_SoftConsole/MicroSemi_Code/drivers_config/mss_ace/ace_config.h b/Demo/CORTEX_A2F200_SoftConsole/MicroSemi_Code/drivers_config/mss_ace/ace_config.h
new file mode 100644 (file)
index 0000000..8f8c584
--- /dev/null
@@ -0,0 +1,37 @@
+/*****************************************************************************\r
+* (c) Copyright  Actel Corporation. All rights reserved.\r
+*\r
+*ACE configuration .h file\r
+*Created by Actel MSS_ACE Configurator Fri Dec 17 12:12:19 2010\r
+*\r
+*/\r
+\r
+#ifndef ACE_CONFIG_H\r
+#define ACE_CONFIG_H\r
+\r
+\r
+/*-----------------------------------------------------------------------------\r
+*COMMON VALUES\r
+*---------------------------------------------------------------------------*/\r
+\r
+/*-----------------------------------------------------------------------------\r
+*AB VALUES\r
+*---------------------------------------------------------------------------*/\r
+#define ACE_NB_OF_ADC                   3\r
+#define ACE_NB_OF_CURRENT_MONITORS      5\r
+#define MAX_CHANNEL_NAME_LENGTH         20\r
+#define ACE_NB_OF_INPUT_CHANNELS        3\r
+\r
+/*-----------------------------------------------------------------------------\r
+*SSE VALUES\r
+*---------------------------------------------------------------------------*/\r
+#define ACE_NB_OF_SSE_PROCEDURES        3\r
+#define MAX_PROCEDURE_NAME_LENGTH       9\r
+\r
+/*-----------------------------------------------------------------------------\r
+*PPE VALUES\r
+*---------------------------------------------------------------------------*/\r
+#define ACE_NB_OF_PPE_FLAGS             0\r
+#define MAX_FLAG_NAME_LENGTH            0\r
+\r
+#endif\r
diff --git a/Demo/CORTEX_A2F200_SoftConsole/MicroSemi_Code/drivers_config/mss_ace/ace_handles.h b/Demo/CORTEX_A2F200_SoftConsole/MicroSemi_Code/drivers_config/mss_ace/ace_handles.h
new file mode 100644 (file)
index 0000000..86782c0
--- /dev/null
@@ -0,0 +1,41 @@
+/*****************************************************************************\r
+* (c) Copyright  Actel Corporation. All rights reserved.\r
+*\r
+*ACE configuration .h file\r
+*Created by Actel MSS_ACE Configurator Fri Dec 17 12:12:19 2010\r
+*\r
+*/\r
+\r
+#ifndef ACE_HANDLES_H\r
+#define ACE_HANDLES_H\r
+\r
+\r
+/*-----------------------------------------------------------------------------\r
+*Analog input channel handles\r
+*---------------------------------------------------------------------------*/\r
+typedef enum {\r
+    CurrentMonitor_0 = 0,\r
+    VoltageMonitor_0,\r
+    TemperatureMonitor_0,\r
+    NB_OF_ACE_CHANNEL_HANDLES\r
+} ace_channel_handle_t;\r
+\r
+/*-----------------------------------------------------------------------------\r
+*Flag Handles\r
+*---------------------------------------------------------------------------*/\r
+typedef enum {\r
+    NB_OF_ACE_FLAG_HANDLES = 0\r
+} ace_flag_handle_t;\r
+\r
+/*-----------------------------------------------------------------------------\r
+*Procedure Handles\r
+*---------------------------------------------------------------------------*/\r
+typedef enum {\r
+    ADC0_MAIN = 0,\r
+    ADC1_MAIN,\r
+    ADC2_MAIN,\r
+    NB_OF_ACE_PROCEDURE_HANDLES\r
+} ace_procedure_handle_t;\r
+\r
+\r
+#endif\r