mynewt-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject incubator-mynewt-core git commit: Add missing include for the AT45DB flash driver
Date Thu, 09 Mar 2017 23:40:37 GMT
Repository: incubator-mynewt-core
Updated Branches:
  refs/heads/develop 3f8f82512 -> 9a167c3bf


Add missing include for the AT45DB flash driver

PR #162 which added the driver for AT45DB was missing the include
file.


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/9a167c3b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/9a167c3b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/9a167c3b

Branch: refs/heads/develop
Commit: 9a167c3bfc57ef0b486584377adfc68a98021706
Parents: 3f8f825
Author: Fabio Utzig <utzig@utzig.org>
Authored: Wed Mar 8 08:18:47 2017 -0300
Committer: Marko Kiiskila <marko@runtime.io>
Committed: Thu Mar 9 15:33:52 2017 -0800

----------------------------------------------------------------------
 hw/drivers/flash/at45db/include/at45db/at45db.h | 55 ++++++++++++++++++++
 1 file changed, 55 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/9a167c3b/hw/drivers/flash/at45db/include/at45db/at45db.h
----------------------------------------------------------------------
diff --git a/hw/drivers/flash/at45db/include/at45db/at45db.h b/hw/drivers/flash/at45db/include/at45db/at45db.h
new file mode 100644
index 0000000..03806c9
--- /dev/null
+++ b/hw/drivers/flash/at45db/include/at45db/at45db.h
@@ -0,0 +1,55 @@
+/*
+ * 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.
+ */
+
+#ifndef __AT45DB_H__
+#define __AT45DB_H__
+
+#include <hal/hal_flash_int.h>
+#include <hal/hal_spi.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct at45db_dev {
+    struct hal_flash hal;
+    struct hal_spi_settings *settings;
+    int spi_num;
+    void *spi_cfg;                  /** Low-level MCU SPI config */
+    int ss_pin;
+    uint32_t baudrate;
+    uint16_t page_size;             /** Page size to be used, valid: 512 and 528 */
+    uint8_t disable_auto_erase;     /** Reads and writes auto-erase by default */
+};
+
+struct at45db_dev * at45db_default_config(void);
+int at45db_read(const struct hal_flash *dev, uint32_t addr, void *buf,
+                uint32_t len);
+int at45db_write(const struct hal_flash *dev, uint32_t addr, const void *buf,
+                 uint32_t len);
+int at45db_erase_sector(const struct hal_flash *dev, uint32_t sector_address);
+int at45db_sector_info(const struct hal_flash *dev, int idx, uint32_t *address,
+                       uint32_t *sz);
+int at45db_init(const struct hal_flash *dev);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __AT45DB_H__ */


Mime
View raw message