Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
4bae100
west.yml: upmerge zephyr and other OSS repositories
mbolivar-nordic Apr 18, 2023
bae3e9c
treewide: update SYS_INIT argument signatures
mbolivar-nordic Apr 17, 2023
3fc220d
treewide: it's int main(void) now
mbolivar-nordic Apr 17, 2023
77bfbf3
treewide: update licenses
mbolivar-nordic Apr 17, 2023
7fb6aa4
treewide: remove references to CONFIG_BT_LL_SW_LLCP
mbolivar-nordic Apr 18, 2023
4933184
treewide: s/ceiling_fraction/DIV_ROUND_UP/g
mbolivar-nordic Apr 18, 2023
a71f995
bluetooth/enocean: remove BT_ENOCEAN_DEBUG kconfig
nvlsianpu Apr 18, 2023
3a351ce
tfm_platform_system.c: don't include zephyr header
mbolivar-nordic Apr 18, 2023
5c30310
samples: empty_net_core: add prj.conf
mbolivar-nordic Apr 18, 2023
94014cf
nrf5340_audio: BT_AUDIO_LC3_PRESET -> BT_BAP_LC3_PRESET
mbolivar-nordic Apr 18, 2023
dae51ef
dm: move to devicetree
mbolivar-nordic Apr 18, 2023
2d92428
samples: ppi_trace: move RTC configuration to devicetree
mbolivar-nordic Apr 18, 2023
a66c49e
bluetooth/gatt_dm: made BT_GATT_DM_DATA_PRINT independent from BT_DEBUG
nvlsianpu Apr 19, 2023
b2dce85
net: lwm2m: Refactor lwm2m_send to lwm2m_send_cb
SeppoTakalo Apr 19, 2023
7310cb2
applications: nrf_desktop: Fix MCUboot FLASH overflow on nRF52820 SoC
MarekPieta Apr 19, 2023
c13c825
tests: mesh: fix net_buf references
mbolivar-nordic Apr 19, 2023
21aca6c
scripts: add ANT samples to quarantine
mbolivar-nordic Apr 19, 2023
8a5cebf
tests: drivers: lpuart: update timer usage
mbolivar-nordic Apr 19, 2023
4efe838
samples: wifi: shell: add missing zperf option
mbolivar-nordic Apr 19, 2023
ee666d3
drivers: wifi: Fix the TWT variable renames
Apr 19, 2023
cded9ee
samples: wifi: Fix the TWT variable renames
Apr 19, 2023
08177f3
bluetooth: rpc: Adapt to the new oob set flag API.
grochu Apr 21, 2023
cdb5f92
samples: bluetooth: Adapt to the new oob set flag API.
grochu Apr 21, 2023
2fed13b
applications: asset_tracker_v2: fix sensor_trigger
maxd-nordic Apr 21, 2023
1289f21
lib: nrf_modem: update nrf91 offloaded net device API
lemrey Apr 21, 2023
2e1a47b
samples: Removed setting LOG_DEFAULT_LEVEL to error
kkasperczyk-no Apr 5, 2023
0533672
gazell: Check that a timer node is not enabled in devicetree
leewkb4567 Apr 20, 2023
99d46b9
boards: arm: Cleanup after counter driver update
nordic-krch Mar 24, 2023
2fc7166
gazell: Adapt to changes in counter
nordic-krch Mar 23, 2023
fab0e58
zigbee: osif: Remove use of CONFIG_COUNTER_TIMER2
nordic-krch Mar 22, 2023
3d7eb82
applications: zigbee_weather_station: Align to zephyr changes
nordic-krch Mar 24, 2023
8b2ea19
samples: zigbee: light_switch: Add overlays enabling counter
nordic-krch Mar 22, 2023
aa8babb
samples: zigbee: light_bulb: Add overlays enabling counter
nordic-krch Mar 22, 2023
1493b11
samples: zigbee: shell: Add overlays enabling counter
nordic-krch Mar 22, 2023
6db3d03
samples: zigbee: template: Add overlays enabling counter
nordic-krch Mar 22, 2023
7a373ad
samples: zigbee: network_coorindator: Align to zephyr changes
nordic-krch Mar 24, 2023
a8c41ea
tests: zigbee: osif: timer_counter: Align to zephyr changes
nordic-krch Mar 22, 2023
ddb69c3
tests: zigbee: osif: nvram: Align to zephyr changes
nordic-krch Mar 23, 2023
c62f86b
tests: zigbee: zboss_api: alarm_api: Align to zephyr changes
nordic-krch Mar 24, 2023
de6c007
tests: zigbee: zboss_api: callback_api: Align to zephyr changes
nordic-krch Mar 24, 2023
58f829c
tests: drivers: lpuart: Align to counter changes
nordic-krch Mar 22, 2023
0d8fc85
samples: peripheral: lpuart: Adapt to counter changes
nordic-krch Mar 22, 2023
2891ba8
debug: cpu_load: Align timer configuration to upstream changes
nordic-krch Apr 24, 2023
aeccaeb
esb: Adapt to the changes in counter.
grochu Apr 25, 2023
915c5be
samples: nrf9160: modem_shell: fix array overflow in iperf3
tokangas Apr 25, 2023
b92af18
tests: boot_chains: add missing prj.conf
mbolivar-nordic Apr 26, 2023
6436c1a
applications: nrf5340_audio: Adjust to fit upmerge code
alexsven Apr 24, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ int lwm2m_codec_helpers_set_neighbor_cell_data(struct cloud_data_neighbor_cells

/** @brief Generate path lists with reference to objects.
* This function outputs a list of paths that can be used to reference objects that should
* be updated (sent to server) when calling the lwm2m_send() function.
* be updated (sent to server) when calling the lwm2m_send_cb() function.
*
* @param[out] output Pointer to structure into which the input path list will be added.
* @param[in] path List that contains LwM2M paths that will be
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ static struct lwm2m_engine_obj_inst *object_create(uint16_t obj_inst_id)
return &inst;
}

static int object_init(const struct device *dev)
static int object_init(void)
{
struct lwm2m_engine_obj_inst *obj_inst = NULL;
int ret = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -464,13 +464,14 @@ int cloud_wrap_data_send(char *buf, size_t len, bool ack, uint32_t id,
{
ARG_UNUSED(buf);
ARG_UNUSED(len);
ARG_UNUSED(ack);
ARG_UNUSED(id);

int err;

err = lwm2m_send(&client, path_list, len, ack);
err = lwm2m_send_cb(&client, path_list, len, NULL);
if (err) {
LOG_ERR("lwm2m_send, error: %d", err);
LOG_ERR("lwm2m_send_cb, error: %d", err);
return err;
}

Expand All @@ -487,13 +488,14 @@ int cloud_wrap_ui_send(char *buf, size_t len, bool ack, uint32_t id,
{
ARG_UNUSED(buf);
ARG_UNUSED(len);
ARG_UNUSED(ack);
ARG_UNUSED(id);

int err;

err = lwm2m_send(&client, path_list, len, ack);
err = lwm2m_send_cb(&client, path_list, len, NULL);
if (err) {
LOG_ERR("lwm2m_send, error: %d", err);
LOG_ERR("lwm2m_send_cb, error: %d", err);
return err;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,11 @@ static struct dfu_target_fmfu_fdev ext_flash_dev = {
.dev = DEVICE_DT_GET_ONE(jedec_spi_nor)
};

static int fmfu_and_modem_init(const struct device *dev)
static int fmfu_and_modem_init(void)
{
enum nrf_cloud_fota_type fota_type = NRF_CLOUD_FOTA_TYPE__INVALID;
int ret;

ARG_UNUSED(dev);

/* Check if a full modem FOTA job is pending */
ret = nrf_cloud_fota_pending_job_type_get(&fota_type);
Expand Down
32 changes: 18 additions & 14 deletions applications/asset_tracker_v2/src/ext_sensors/ext_sensors.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,21 @@ static struct env_sensor accel_sensor_lp = {
.dev = DEVICE_DT_GET(DT_ALIAS(accelerometer)),
};

static struct sensor_trigger adxl362_sensor_trigger_motion = {
.chan = SENSOR_CHAN_ACCEL_XYZ,
.type = SENSOR_TRIG_MOTION
};

static struct sensor_trigger adxl362_sensor_trigger_stationary = {
.chan = SENSOR_CHAN_ACCEL_XYZ,
.type = SENSOR_TRIG_STATIONARY
};

#if defined(CONFIG_EXTERNAL_SENSORS_IMPACT_DETECTION)
static struct sensor_trigger adxl372_sensor_trigger = {
.chan = SENSOR_CHAN_ACCEL_XYZ,
.type = SENSOR_TRIG_THRESHOLD
};
/** Sensor struct for the high-G accelerometer */
static struct env_sensor accel_sensor_hg = {
.channel = SENSOR_CHAN_ACCEL_XYZ,
Expand Down Expand Up @@ -128,7 +142,7 @@ static void accelerometer_trigger_handler(const struct device *dev,

break;
default:
LOG_ERR("Unknown trigger");
LOG_ERR("Unknown trigger: %d", trig->type);
}
}

Expand Down Expand Up @@ -221,13 +235,8 @@ int ext_sensors_init(ext_sensor_handler_t handler)
evt.type = EXT_SENSOR_EVT_ACCELEROMETER_ERROR;
evt_handler(&evt);
} else {
struct sensor_trigger trig = {
.chan = SENSOR_CHAN_ACCEL_XYZ,
.type = SENSOR_TRIG_THRESHOLD
};

int err = sensor_trigger_set(accel_sensor_hg.dev,
&trig, impact_trigger_handler);
&adxl372_sensor_trigger, impact_trigger_handler);
if (err) {
LOG_ERR("Could not set trigger for device %s, error: %d",
accel_sensor_hg.dev->name, err);
Expand Down Expand Up @@ -436,20 +445,15 @@ int ext_sensors_inactivity_timeout_set(double inact_time)
int ext_sensors_accelerometer_trigger_callback_set(bool enable)
{
int err;
struct sensor_trigger trig = {
.chan = SENSOR_CHAN_ACCEL_XYZ,
.type = SENSOR_TRIG_MOTION
};
struct ext_sensor_evt evt = {0};

sensor_trigger_handler_t handler = enable ? accelerometer_trigger_handler : NULL;

err = sensor_trigger_set(accel_sensor_lp.dev, &trig, handler);
err = sensor_trigger_set(accel_sensor_lp.dev, &adxl362_sensor_trigger_motion, handler);
if (err) {
goto error;
}
trig.type = SENSOR_TRIG_STATIONARY;
err = sensor_trigger_set(accel_sensor_lp.dev, &trig, handler);
err = sensor_trigger_set(accel_sensor_lp.dev, &adxl362_sensor_trigger_stationary, handler);
if (err) {
goto error;
}
Expand Down
3 changes: 2 additions & 1 deletion applications/asset_tracker_v2/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ static void on_all_events(struct app_msg_data *msg)
}
}

void main(void)
int main(void)
{
int err;
struct app_msg_data msg = { 0 };
Expand Down Expand Up @@ -566,6 +566,7 @@ void main(void)

on_all_events(&msg);
}
return 0;
}

APP_EVENT_LISTENER(MODULE, app_event_handler);
Expand Down
3 changes: 1 addition & 2 deletions applications/asset_tracker_v2/src/modules/ui_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -330,9 +330,8 @@ static void led_pattern_update_work_fn(struct k_work *work)
}
}

static int setup(const struct device *dev)
static int setup(void)
{
ARG_UNUSED(dev);

int err;

Expand Down
3 changes: 1 addition & 2 deletions applications/asset_tracker_v2/src/modules/util_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,8 @@ static void reboot_ack_check(uint32_t module_id)
}
}

static int setup(const struct device *dev)
static int setup(void)
{
ARG_UNUSED(dev);

#if defined(CONFIG_WATCHDOG_APPLICATION)
int err = watchdog_init_and_start();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ struct event_type __event_type_sensor_module_event;
struct event_type __event_type_ui_module_event;
struct event_type __event_type_util_module_event;

/* The following is required because unity is using a different main signature
* (returns int) and zephyr expects main to not return value.
/* It is required to be added to each test. That is because unity's
* main may return nonzero, while zephyr's main currently must
* return 0 in all cases (other values are reserved).
*/
extern int unity_main(void);

Expand Down Expand Up @@ -267,7 +268,8 @@ void test_memfault_software_watchdog_trigger_on_callback(void)
evt.type = WATCHDOG_EVT_FEED;
}

void main(void)
int main(void)
{
(void)unity_main();
return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,9 @@ struct event_type __event_type_modem_module_event;

/* Dummy functions and objects - End. */

/* The following is required because unity is using a different main signature
* (returns int) and zephyr expects main to not return value.
/* It is required to be added to each test. That is because unity's
* main may return nonzero, while zephyr's main currently must
* return 0 in all cases (other values are reserved).
*/
extern int unity_main(void);

Expand Down Expand Up @@ -522,7 +523,8 @@ void test_location_fail_init(void)
TEST_ASSERT_EQUAL(0, ret);
}

void main(void)
int main(void)
{
(void)unity_main();
return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
/* Mon Dec 05 2022 09:38:04 */
#define UNIX_TIMESTAMP_DUMMY 1670233084418

/* It is required to be added to each test. That is because unity's
* main may return nonzero, while zephyr's main currently must
* return 0 in all cases (other values are reserved).
*/
extern int unity_main(void);

/* Used to verify that the uut properly sets the value that is returned by date_time_now() to
Expand Down Expand Up @@ -853,7 +857,8 @@ void test_codec_helpers_object_path_list_generate_too_many_paths(void)
ARRAY_SIZE(path_list)));
}

void main(void)
int main(void)
{
(void)unity_main();
return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ static int init_security_callback_stub(struct lwm2m_ctx *ctx,
static int init_firmware_cb_stub(lwm2m_firmware_event_cb_t cb,
int no_of_calls);

/* It is required to be added to each test. That is because unity's
* main may return nonzero, while zephyr's main currently must
* return 0 in all cases (other values are reserved).
*/
extern int unity_main(void);

/* Setup and teardown functions. */
Expand Down Expand Up @@ -178,7 +182,7 @@ void test_lwm2m_integration_data_send(void)
LWM2M_OBJ(4, 0, 7),
};

__cmock_lwm2m_send_ExpectAndReturn(&client, paths, PATH_LEN, true, 0);
__cmock_lwm2m_send_cb_ExpectAndReturn(&client, paths, PATH_LEN, NULL, 0);

TEST_ASSERT_EQUAL(0, cloud_wrap_data_send(NULL, PATH_LEN, true, 0, paths));
}
Expand All @@ -194,7 +198,7 @@ void test_lwm2m_integration_ui_send(void)
LWM2M_OBJ(4, 0, 7),
};

__cmock_lwm2m_send_ExpectAndReturn(&client, paths, PATH_LEN, true, 0);
__cmock_lwm2m_send_cb_ExpectAndReturn(&client, paths, PATH_LEN, NULL, 0);

TEST_ASSERT_EQUAL(0, cloud_wrap_ui_send(NULL, PATH_LEN, true, 0, paths));
}
Expand Down Expand Up @@ -381,7 +385,8 @@ void test_lwm2m_integration_fota_update_image_req(void)
TEST_ASSERT_EQUAL(UINT8_MAX, last_cb_type);
}

void main(void)
int main(void)
{
(void)unity_main();
return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -627,13 +627,14 @@ void test_enc_batch_data_ui_toobig(void)
}


/* It is required to be added to each test. That is because unity is using
* different main signature (returns int) and zephyr expects main which does
* not return value.
/* It is required to be added to each test. That is because unity's
* main may return nonzero, while zephyr's main currently must
* return 0 in all cases (other values are reserved).
*/
extern int unity_main(void);

void main(void)
int main(void)
{
(void)unity_main();
return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -553,13 +553,14 @@ void test_enc_config_nomem1(void)
TEST_ASSERT_EQUAL(-ENOMEM, ret);
}

/* It is required to be added to each test. That is because unity is using
* different main signature (returns int) and zephyr expects main which does
* not return value.
/* It is required to be added to each test. That is because unity's
* main may return nonzero, while zephyr's main currently must
* return 0 in all cases (other values are reserved).
*/
extern int unity_main(void);

void main(void)
int main(void)
{
(void)unity_main();
return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@ struct event_type __event_type_sensor_module_event;
struct event_type __event_type_ui_module_event;
struct event_type __event_type_util_module_event;

/* The following is required because unity is using a different main signature
* (returns int) and zephyr expects main to not return value.
/* It is required to be added to each test. That is because unity's
* main may return nonzero, while zephyr's main currently must
* return 0 in all cases (other values are reserved).
*/
extern int unity_main(void);

Expand Down Expand Up @@ -403,7 +404,8 @@ void test_mode_transition(void)
verify_publication(true);
}

void main(void)
int main(void)
{
(void)unity_main();
return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
/* Suppress linker that warns that setup() is not used. This is because the function is run
* at SYS_INIT, which is now redefined.
*/
static int setup(const struct device *dev) __attribute__((unused));
static int setup(void) __attribute__((unused));

#endif /* UI_MODULE_TEST */
3 changes: 2 additions & 1 deletion applications/connectivity_bridge/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@ uint8_t *usb_update_sn_string_descriptor(void)
return usb_serial_str;
}

void main(void)
int main(void)
{
if (app_event_manager_init()) {
LOG_ERR("Application Event Manager not initialized");
} else {
module_set_state(MODULE_STATE_READY);
}
return 0;
}
3 changes: 2 additions & 1 deletion applications/machine_learning/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@
LOG_MODULE_REGISTER(MODULE);


void main(void)
int main(void)
{
if (app_event_manager_init()) {
LOG_ERR("Application Event Manager initialization failed");
} else {
module_set_state(MODULE_STATE_READY);
}
return 0;
}
Loading