浏览代码

waterDataStatisticsCrossAssociation memoryDefinitionWaterRelatedData.h 张婷 commit at 2021-02-10

张婷 4 年之前
父节点
当前提交
bd2013110b
共有 1 个文件被更改,包括 35 次插入0 次删除
  1. 35 0
      waterDataStatisticsCrossAssociation/dataSharedMemory/memoryDefinitionWaterRelatedData.h

+ 35 - 0
waterDataStatisticsCrossAssociation/dataSharedMemory/memoryDefinitionWaterRelatedData.h

@@ -506,3 +506,38 @@
 #define OCD_RNG_EXCLUSIVE		1
 #define OCD_RNG_INCLUSIVE		2
 
+/* Constants for EPC2:DB */
+#define OCD_DB_DISABLED			0
+#define OCD_DB_CHAINED_B		1
+#define OCD_DB_CHAINED_A		2
+#define OCD_DB_AHAINED_A_AND_B		3
+
+/* Constants for EPC3:RNG */
+#define OCD_RNG_DISABLED		0
+#define OCD_RNG_EXCLUSIVE		1
+#define OCD_RNG_INCLUSIVE		2
+
+#ifndef __ASSEMBLER__
+
+/* Register access macros */
+static inline unsigned long __ocd_read(unsigned int reg)
+{
+	return __builtin_mfdr(reg);
+}
+
+static inline void __ocd_write(unsigned int reg, unsigned long value)
+{
+	__builtin_mtdr(reg, value);
+}
+
+#define ocd_read(reg)			__ocd_read(OCD_##reg)
+#define ocd_write(reg, value)		__ocd_write(OCD_##reg, value)
+
+struct task_struct;
+
+void ocd_enable(struct task_struct *child);
+void ocd_disable(struct task_struct *child);
+
+#endif /* !__ASSEMBLER__ */
+
+#endif /* __ASM_AVR32_OCD_H */