summaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorAnas Nashif <anas.nashif@intel.com>2016-03-03 13:02:56 -0500
committerGerrit Code Review <gerrit@zephyrproject.org>2016-03-04 00:59:36 +0000
commit21594aa1fd1fd22928364540561701db17f69dfb (patch)
tree9b9dde90a8e034f32b133072fce856c8bcf8f497 /samples
parentea3b5d356c269f97a7be2b54323c86165140b470 (diff)
Revert "samples: A test app for WinBond spi flash"
This reverts commit 1b1a9ef8457410a6486aa25f0d99d6c9f3e0ca16. This sample was merged by mistake and without the needed drivers or APIs. Change-Id: Icf588ed3517e9c2f905d319e6f6f5fff935aa77a Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Diffstat (limited to 'samples')
-rw-r--r--samples/drivers/spi_flash/Makefile6
-rw-r--r--samples/drivers/spi_flash/README.txt35
-rw-r--r--samples/drivers/spi_flash/prj.conf7
-rw-r--r--samples/drivers/spi_flash/prj.mdef5
-rw-r--r--samples/drivers/spi_flash/src/Makefile1
-rw-r--r--samples/drivers/spi_flash/src/main.c75
6 files changed, 0 insertions, 129 deletions
diff --git a/samples/drivers/spi_flash/Makefile b/samples/drivers/spi_flash/Makefile
deleted file mode 100644
index e6894e365..000000000
--- a/samples/drivers/spi_flash/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-MDEF_FILE = prj.mdef
-KERNEL_TYPE = micro
-BOARD ?= arduino_101
-CONF_FILE = prj.conf
-
-include ${ZEPHYR_BASE}/Makefile.inc
diff --git a/samples/drivers/spi_flash/README.txt b/samples/drivers/spi_flash/README.txt
deleted file mode 100644
index 2b9d66ecb..000000000
--- a/samples/drivers/spi_flash/README.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-Title: SPI flash read and write
-
-Description:
-
-A simple spi flash example using the microkernel.
-
---------------------------------------------------------------------------------
-
-Building and Running Project:
-
-This microkernel project outputs to the console. It can be built and executed
-on arduino_101 as follows:
-
- make BOARD=arduino_101
-
---------------------------------------------------------------------------------
-
-Troubleshooting:
-
-Problems caused by out-dated project information can be addressed by
-issuing one of the following commands then rebuilding the project:
-
- make clean # discard results of previous builds
- # but keep existing configuration info
-or
- make pristine # discard results of previous builds
- # and restore pre-defined configuration info
-
---------------------------------------------------------------------------------
-
-Sample Output:
-
-SPI flash testing!
-data sent ..
-data received ...
diff --git a/samples/drivers/spi_flash/prj.conf b/samples/drivers/spi_flash/prj.conf
deleted file mode 100644
index f6e34b918..000000000
--- a/samples/drivers/spi_flash/prj.conf
+++ /dev/null
@@ -1,7 +0,0 @@
-# Use standard security profile. (=> no need for a random number generator)
-CONFIG_STDOUT_CONSOLE=y
-CONFIG_FLASH=y
-CONFIG_SPI=y
-CONFIG_GPIO=y
-CONFIG_SPI_DW_CS_GPIO=y
-CONFIG_SPI_DW_PORT_0_CS_GPIO_PIN=24
diff --git a/samples/drivers/spi_flash/prj.mdef b/samples/drivers/spi_flash/prj.mdef
deleted file mode 100644
index a4b7a99c2..000000000
--- a/samples/drivers/spi_flash/prj.mdef
+++ /dev/null
@@ -1,5 +0,0 @@
-% Application : SPI flash demo
-
-% TASK NAME PRIO ENTRY STACK GROUPS
-% ==================================
- TASK TASKA 7 main 2048 [EXE]
diff --git a/samples/drivers/spi_flash/src/Makefile b/samples/drivers/spi_flash/src/Makefile
deleted file mode 100644
index 00066e156..000000000
--- a/samples/drivers/spi_flash/src/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-obj-y = main.o
diff --git a/samples/drivers/spi_flash/src/main.c b/samples/drivers/spi_flash/src/main.c
deleted file mode 100644
index 6f3c08058..000000000
--- a/samples/drivers/spi_flash/src/main.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 2016 Intel Corporation.
- *
- * 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.
- */
-
-#include <zephyr.h>
-#include <flash.h>
-#include <device.h>
-#if defined(CONFIG_STDOUT_CONSOLE)
-#include <stdio.h>
-#define PRINT printf
-#else
-#include <misc/printk.h>
-#define PRINT printk
-#endif
-
-#define FLASH_TEST_REGION_OFFSET 0xff000
-#define FLASH_SECTOR_SIZE 4096
-#define TEST_DATA_BYTE_0 0x55
-#define TEST_DATA_BYTE_1 0xaa
-#define TEST_DATA_LEN 2
-
-void main(void)
-{
- PRINT("SPI flash testing!\n");
-
- struct device *dev;
- uint8_t buf[TEST_DATA_LEN];
-
- dev = device_get_binding("W25QXXDV");
-
- if (!dev) {
- PRINT("SPI flash driver was not found!\n");
- return;
- }
-
- flash_write_protected(dev, false);
-
- flash_erase(dev, FLASH_TEST_REGION_OFFSET, FLASH_SECTOR_SIZE);
-
- flash_write_protected(dev, false);
-
- buf[0] = TEST_DATA_BYTE_0;
- buf[1] = TEST_DATA_BYTE_1;
- if (flash_write(dev, FLASH_TEST_REGION_OFFSET,
- TEST_DATA_LEN, buf) != DEV_OK) {
- PRINT("SPI flash did not work as expected!\n");
- return;
- }
- PRINT("data sent %x %x\n", buf[0], buf[1]);
-
- if (flash_read(dev, FLASH_TEST_REGION_OFFSET,
- TEST_DATA_LEN, buf) != DEV_OK) {
- PRINT("SPI flash did not work as expected!\n");
- return;
- }
- PRINT("data received %x %x\n", buf[0], buf[1]);
-
- if ((buf[0] == TEST_DATA_BYTE_0) && (buf[1] == TEST_DATA_BYTE_1)) {
- PRINT("data received matches with data sent. Good!!\n");
- } else {
- PRINT("data received does not match with data sent!!\n");
- }
-}