Minor project changes

This commit is contained in:
philsson 2018-08-25 11:37:47 +02:00
parent c0081fc459
commit cece827795
7 changed files with 10 additions and 44 deletions

1
.gitignore vendored
View File

@ -36,6 +36,7 @@
outdir
**outdir
**BUILD
.built-in.o.cmd
.main.o.cmd

4
.vscode/arduino.json vendored Normal file
View File

@ -0,0 +1,4 @@
{
"board": "AZ3166:stm32f4:MXCHIP_AZ3166",
"configuration": "upload_method=OpenOCDMethod"
}

5
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,5 @@
// Place your settings in this file to overwrite default and user settings.
{
//"C_Cpp.intelliSenseEngine": "Default" // Does not work with "Go to definition" etc.
"C_Cpp.intelliSenseEngine": "Tag Parser"
}

BIN
core Normal file

Binary file not shown.

View File

@ -1,5 +0,0 @@
CONFIG_GPIO=y
CONFIG_NANO_TIMERS=y
CONFIG_NANO_TIMEOUTS=y
CONFIG_DEBUG=y
CONFIG_SERIAL=n

View File

@ -1 +0,0 @@
obj-y = main.o

View File

@ -1,38 +0,0 @@
/*
* Copyright (c) 2016 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr.h>
#include <board.h>
#include <device.h>
#include <gpio.h>
/* Change this if you have an LED connected to a custom port */
//#define PORT "GPIOA"
#define PORT LED0_GPIO_PORT
/* Change this if you have an LED connected to a custom pin */
//#define LED 4
#define LED LED0_GPIO_PIN
/* 1000 msec = 1 sec */
#define SLEEP_TIME 500
void main(void)
{
int cnt = 0;
struct device *dev;
dev = device_get_binding(PORT);
/* Set LED pin as output */
gpio_pin_configure(dev, LED, GPIO_DIR_OUT);
while (1) {
/* Set pin to HIGH/LOW every 1 second */
gpio_pin_write(dev, LED, cnt % 2);
cnt++;
k_sleep(SLEEP_TIME);
}
}