센서보드 RF IRQ 테스트 중

Fork of stm-spirit1-rf-driver by ST

Files at this revision

API Documentation at this revision

Comitter:
Wolfgang Betz
Date:
Mon Nov 21 10:04:43 2016 +0100
Parent:
31:a4d8072139f2
Child:
33:c226804be492
Commit message:
Add custom file "driverRFPhy.h"

- To be discussed with ARM

Changed in this revision

atmel-rf-driver/driverRFPhy.h Show annotated file Show diff for this revision Revisions of this file
mbed_driver_api.cpp Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/atmel-rf-driver/driverRFPhy.h	Mon Nov 21 10:04:43 2016 +0100
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2014-2015 ARM Limited. All rights reserved.
+ * SPDX-License-Identifier: Apache-2.0
+ * Licensed under the Apache License, Version 2.0 (the License); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef DRIVERRFPHY_H_
+#define DRIVERRFPHY_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "nanostack/platform/arm_hal_phy.h"
+	
+/*Atmel RF Part Type*/
+typedef enum {
+	ATMEL_UNKNOW_DEV = 0,
+	ATMEL_AT86RF212,
+	ATMEL_AT86RF231,
+	ATMEL_AT86RF233
+}rf_trx_part_e;
+	
+extern int8_t rf_device_register(void);
+extern rf_trx_part_e rf_radio_type_read(void);
+extern void rf_read_mac_address(uint8_t *ptr);
+extern int8_t rf_read_random(void);
+	
+#ifdef __cplusplus
+}
+#endif
+#endif /* DRIVERRFPHY_H_ */
--- a/mbed_driver_api.cpp	Mon Nov 21 09:41:37 2016 +0100
+++ b/mbed_driver_api.cpp	Mon Nov 21 10:04:43 2016 +0100
@@ -1,6 +1,7 @@
 #include "SimpleSpirit1.h"
 #include "nanostack/platform/arm_hal_phy.h"
 #include "platform/arm_hal_interrupt.h"
+#include "driverRFPhy.h"
 
 #include "mbed_trace.h"
 #define TRACE_GROUP  "SPIRIT"
@@ -11,16 +12,6 @@
 /* Define beyond macro if you want to use acknowledgment frames with only 3 bytes */
 #define SHORT_ACK_FRAMES
 
-/*Atmel RF Part Type*/
-// betzw - TODO
-typedef enum
-{
-    ATMEL_UNKNOW_DEV = 0,
-    ATMEL_AT86RF212,
-    ATMEL_AT86RF231,
-    ATMEL_AT86RF233
-}rf_trx_part_e;
-
 static uint8_t mac_address[8] = {
 		MBED_CONF_SPIRIT1_MAC_ADDRESS_0,
 		MBED_CONF_SPIRIT1_MAC_ADDRESS_1,