Skip to content

Commit

Permalink
app: updates to build using latest main
Browse files Browse the repository at this point in the history
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
  • Loading branch information
gmarull committed Apr 5, 2024
1 parent 0c67be0 commit 175dc58
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Build firmware
working-directory: app
run: |
west build -b nrf52840dk_nrf52840 -s app
west build -b nrf52840dk/nrf52840 -s app
- name: Archive firmware
uses: actions/upload-artifact@v2
Expand Down
1 change: 1 addition & 0 deletions app/boards/nrf52840dk_nrf52840.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
};

&uart1 {
status = "okay";
#address-cells = <1>;
#size-cells = <0>;

Expand Down
12 changes: 7 additions & 5 deletions app/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ void fp_trig_handler(const struct device *dev,
* Entry point
******************************************************************************/

void main(void)
int main(void)
{
int ret;
const struct sensor_trigger trig = {
Expand All @@ -196,12 +196,12 @@ void main(void)

if (!device_is_ready(fpreader)) {
printk("Fingerprint reader not ready");
return;
return 0;
}

if (!device_is_ready(lock)) {
printk("Lock not ready");
return;
return 0;
}

/* run enroll (will be skipped if sw0 is not pressed) */
Expand All @@ -217,13 +217,15 @@ void main(void)
ret = bt_enable(NULL);
if (ret < 0) {
printk("Bluetooth init failed (ret %d)\n", ret);
return;
return 0;
}

ret = bt_le_adv_start(BT_LE_ADV_CONN, ad, ARRAY_SIZE(ad), sd,
ARRAY_SIZE(sd));
if (ret < 0) {
printk("Advertising failed to start (%d)", ret);
return;
return 0;
}

return 0;
}
4 changes: 3 additions & 1 deletion drivers/lock/Kconfig.servo
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
config LOCK_SERVO
bool "Servo-controlled lock"
default y
depends on PWM && ADC && DT_HAS_LOCK_SERVO_ENABLED
depends on DT_HAS_LOCK_SERVO_ENABLED
select PWM
select ADC
help
Enables a servo-controlled lock driver.
5 changes: 4 additions & 1 deletion drivers/sensor/jm101/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
config JM101
bool "JM-101 fingerprint sensor"
default y
depends on GPIO && SERIAL && UART_INTERRUPT_DRIVEN && DT_HAS_ZEANTEC_JM101_ENABLED
depends on DT_HAS_ZEANTEC_JM101_ENABLED
select GPIO
select SERIAL
select UART_INTERRUPT_DRIVEN
help
JM-101 fingerprint sensor.

Expand Down

0 comments on commit 175dc58

Please sign in to comment.