mynewt-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject [41/45] incubator-mynewt-core git commit: mcu: MK64F12: add stubbed hw_id HAL
Date Tue, 11 Oct 2016 16:26:00 GMT
mcu: MK64F12: add stubbed hw_id HAL

- Need to research method for reading serial # and do actual
  implementation
- This satisfies the requirements for running apps like slinky

Signed-off-by: Michael Scott <michael.scott@linaro.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/d7de20eb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/d7de20eb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/d7de20eb

Branch: refs/heads/develop
Commit: d7de20eb7e250ee0f76986f4800f14ca79f8d5c2
Parents: 182ea6d
Author: Michael Scott <michael.scott@linaro.org>
Authored: Fri Oct 7 16:37:51 2016 -0700
Committer: Michael Scott <michael.scott@linaro.org>
Committed: Mon Oct 10 23:59:41 2016 -0700

----------------------------------------------------------------------
 hw/mcu/nxp/MK64F12/src/hal_hw_id.c | 39 +++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d7de20eb/hw/mcu/nxp/MK64F12/src/hal_hw_id.c
----------------------------------------------------------------------
diff --git a/hw/mcu/nxp/MK64F12/src/hal_hw_id.c b/hw/mcu/nxp/MK64F12/src/hal_hw_id.c
new file mode 100644
index 0000000..e5ce55e
--- /dev/null
+++ b/hw/mcu/nxp/MK64F12/src/hal_hw_id.c
@@ -0,0 +1,39 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+#include <inttypes.h>
+#include <string.h>
+
+#include <hal/hal_bsp.h>
+
+#include "MK64F12.h"
+
+#ifndef min
+#define min(a, b) ((a)<(b)?(a):(b))
+#endif
+
+/*
+ * TODO: Use serial# registers
+ */
+int bsp_hw_id(uint8_t *id, int max_len)
+{
+    memcpy(id, (void *)"ABCDEFG", 8);
+
+    return 7;
+}


Mime
View raw message