Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id C2B09200C41 for ; Fri, 10 Mar 2017 00:40:42 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id BFBDE160B84; Thu, 9 Mar 2017 23:40:42 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 131DA160B75 for ; Fri, 10 Mar 2017 00:40:41 +0100 (CET) Received: (qmail 61894 invoked by uid 500); 9 Mar 2017 23:40:41 -0000 Mailing-List: contact commits-help@mynewt.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@mynewt.incubator.apache.org Delivered-To: mailing list commits@mynewt.incubator.apache.org Received: (qmail 61885 invoked by uid 99); 9 Mar 2017 23:40:41 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Mar 2017 23:40:41 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id BCDCAC132E for ; Thu, 9 Mar 2017 23:40:40 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -3.568 X-Spam-Level: X-Spam-Status: No, score=-3.568 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001, SPF_NEUTRAL=0.652, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id JC91Lpc95f1n for ; Thu, 9 Mar 2017 23:40:39 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id 9BF2D5F64B for ; Thu, 9 Mar 2017 23:40:38 +0000 (UTC) Received: (qmail 61852 invoked by uid 99); 9 Mar 2017 23:40:37 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Mar 2017 23:40:37 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id C7968DFDE6; Thu, 9 Mar 2017 23:40:37 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: marko@apache.org To: commits@mynewt.incubator.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: incubator-mynewt-core git commit: Add missing include for the AT45DB flash driver Date: Thu, 9 Mar 2017 23:40:37 +0000 (UTC) archived-at: Thu, 09 Mar 2017 23:40:42 -0000 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 Authored: Wed Mar 8 08:18:47 2017 -0300 Committer: Marko Kiiskila 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 +#include + +#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__ */