Skip to content

Commit

Permalink
Build against Zephyr 2.4.0 (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
IvoBCD authored Nov 9, 2020
1 parent 76136d1 commit 0f95bd9
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/actions/action-zephyr/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# SPDX-License-Identifier: Apache-2.0
#

FROM bcdevices/zephyr-west:zephyr-2.3.0-0
FROM bcdevices/zephyr-west:zephyr-2.4.0-0

LABEL "com.github.actions.name"="Zephyr build"
LABEL "com.github.actions.description"="Build Zephyr project"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# SPDX-License-Identifier: Apache-2.0
#

FROM bcdevices/zephyr-west:zephyr-2.3.0-0
FROM bcdevices/zephyr-west:zephyr-2.4.0-0

WORKDIR /usr/src/
## Copy everything (use .dockerignore to exclude)
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ SERVO_MOTOR_TARGETS := $(patsubst %,build.%/servo_motor/zephyr/zephyr.hex,$(BOAR
SHELL_TARGETS := $(patsubst %,build.%/shell/zephyr/zephyr.hex,$(BOARDS_COMMON))

ZEPHYR_SYSROOT := /usr/src/zephyrproject/zephyr
#ZEPHYR_SYSROOT := /usr/src/zephyr-2.3.0/zephyr
ZEPHYR_USRROOT := $(HOME)/src/zephyr-2.3.0/zephyr
#ZEPHYR_SYSROOT := /usr/src/zephyr-2.4.0/zephyr
ZEPHYR_USRROOT := $(HOME)/src/zephyr-2.4.0/zephyr

build.%/blinky/zephyr/zephyr.hex:
mkdir -p build.$*/blinky
Expand Down
4 changes: 2 additions & 2 deletions app/prj.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_GATT_DIS=y
CONFIG_BT_GATT_DIS_PNP=n
CONFIG_BT_DIS=y
CONFIG_BT_DIS_PNP=n
CONFIG_BT_DEVICE_NAME="LY10ZEPH"
CONFIG_STDOUT_CONSOLE=y
CONFIG_I2C=y
Expand Down
6 changes: 3 additions & 3 deletions app/src/app_ble.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ static const struct bt_data ad[] = {
BT_DATA_BYTES(BT_DATA_UUID16_ALL, 0x0a, 0x18),
};

static void connected(struct bt_conn *conn, u8_t err)
static void connected(struct bt_conn *conn, uint8_t err)
{
if (err) {
printk("Connection failed (err %u)\n", err);
Expand All @@ -27,7 +27,7 @@ static void connected(struct bt_conn *conn, u8_t err)
}
}

static void disconnected(struct bt_conn *conn, u8_t reason)
static void disconnected(struct bt_conn *conn, uint8_t reason)
{
printk("Disconnected (reason %u)\n", reason);
}
Expand Down Expand Up @@ -58,7 +58,7 @@ int app_ble(void)
printk("Advertising successfully started on the Demo Board\n");

// Get MAC Address
u8_t *bd_addr = (u8_t *) ll_addr_get(1, NULL); // '1' as first parameter indicates we are seeking the 'random' BD address
uint8_t *bd_addr = (uint8_t *) ll_addr_get(1, NULL); // '1' as first parameter indicates we are seeking the 'random' BD address
printk("Random BD Address: %02x:%02x:%02x:%02x:%02x:%02x\n",
bd_addr[5], bd_addr[4], bd_addr[3],
bd_addr[2], bd_addr[1], bd_addr[0]);
Expand Down
6 changes: 3 additions & 3 deletions app/src/app_buzzer.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
#define PWM_CHANNEL 0
#endif

static u32_t period = PERIOD_INIT;
static uint32_t period = PERIOD_INIT;

static u32_t note_periods[] = {
static uint32_t note_periods[] = {
1000000U / 988, /* B */
1000000U / 880, /* A */
1000000U / 784, /* G */
Expand All @@ -43,7 +43,7 @@ static u32_t note_periods[] = {

int app_buzzer_setup(void)
{
struct device *pwm;
const struct device *pwm;

pwm = device_get_binding(PWM_LABEL);
if (NULL == pwm) {
Expand Down
4 changes: 2 additions & 2 deletions app/src/app_ledstrip.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#define GPIO_PWR_EN 25
#define STRIP_NUM_LEDS 4

static struct device *strip;
static const struct device *strip;
static size_t ledstrip_counter = 0;

static const struct led_rgb colors[] = {
Expand Down Expand Up @@ -45,7 +45,7 @@ const struct led_rgb *color_at(size_t time, size_t i)

int app_ledstrip_setup(void)
{
struct device *gpio_out_dev;
const struct device *gpio_out_dev;
int ret;

gpio_out_dev = device_get_binding(GPIO_OUT_DRV_NAME);
Expand Down
2 changes: 1 addition & 1 deletion app/src/app_sensor.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
int app_sensor_setup(void)
{
struct sensor_value temp, hum;
struct device *dev = device_get_binding("SHT3XD");
const struct device *dev = device_get_binding("SHT3XD");
int rc;

if (dev == NULL) {
Expand Down

0 comments on commit 0f95bd9

Please sign in to comment.