Skip to content

project raspberrypi4b make #9

Description

@PaoloPK

Version

No response

Describe the bug

Hi, I wanted to compile the class for raspberry but it gave me an error:

libgpiod-dev pkg-config cmake -y
Lettura elenco dei pacchetti... Fatto
Generazione albero delle dipendenze... Fatto
Lettura informazioni sullo stato... Fatto
libgpiod-dev ▒ gi▒ alla versione pi▒ recente (2.2.1-2).
pkg-config ▒ gi▒ alla versione pi▒ recente (1.8.1-4).
cmake ▒ gi▒ alla versione pi▒ recente (3.31.6-2).
0 aggiornati, 0 installati, 0 da rimuovere e 0 non aggiornati.
paolo@RaspLora:~/lora/sx1262-main/project/raspberrypi4b $

########################################
make
gcc -O3 -DNDEBUG ../../src/driver_sx1262.c ../../example/driver_sx1262_lora.c .. /../test/driver_sx1262_cad_test.c ../../test/driver_sx1262_register_test.c ../.. /test/driver_sx1262_send_receive_test.c interface/src/gpio.c interface/src/spi.c interface/src/wire.c driver/src/raspberrypi4b_driver_sx1262_interface.c src/mai n.c -I ../../src/ -I ../../interface/ -I ../../example/ -I ../../test/ -I ./inte rface/inc/ -lm -lpthread -lgpiod -o sx1262
interface/src/gpio.c: In function 'a_gpio_interrupt_pthread':
interface/src/gpio.c:68:29: error: storage size of 'event' isn't known
68 | struct gpiod_line_event event;
| ^~~~~
interface/src/gpio.c:80:15: error: implicit declaration of function 'gpiod_line_ event_wait'; did you mean 'gpiod_edge_event_copy'? [-Wimplicit-function-declarat ion]
80 | res = gpiod_line_event_wait(gs_line, NULL);
| ^~~~~~~~~~~~~~~~~~~~~
| gpiod_edge_event_copy
interface/src/gpio.c:84:17: error: implicit declaration of function 'gpiod_line_ event_read'; did you mean 'gpiod_edge_event_free'? [-Wimplicit-function-declarat ion]
84 | if (gpiod_line_event_read(gs_line, &event) != 0)
| ^~~~~~~~~~~~~~~~~~~~~
| gpiod_edge_event_free
interface/src/gpio.c:90:37: error: 'GPIOD_LINE_EVENT_RISING_EDGE' undeclared (fi rst use in this function); did you mean 'GPIOD_EDGE_EVENT_RISING_EDGE'?
90 | if (event.event_type == GPIOD_LINE_EVENT_RISING_EDGE)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| GPIOD_EDGE_EVENT_RISING_EDGE
interface/src/gpio.c:90:37: note: each undeclared identifier is reported only on ce for each function it appears in
interface/src/gpio.c: In function 'gpio_interrupt_init':
interface/src/gpio.c:124:15: error: implicit declaration of function 'gpiod_chip get_line'; did you mean 'gpiod_chip_get_info'? [-Wimplicit-function-declaration ]
124 | gs_line = gpiod_chip_get_line(gs_chip, GPIO_DEVICE_LINE);
| ^~~~~~~~~~~~~~~~~~~
| gpiod_chip_get_info
interface/src/gpio.c:124:13: error: assignment to 'struct gpiod_line *' from 'in t' makes pointer from integer without a cast [-Wint-conversion]
124 | gs_line = gpiod_chip_get_line(gs_chip, GPIO_DEVICE_LINE);
| ^
interface/src/gpio.c:134:9: error: implicit declaration of function 'gpiod_line
request_rising_edge_events'; did you mean 'gpiod_line_request_read_edge_events'? [-Wimplicit-function-declaration]
134 | if (gpiod_line_request_rising_edge_events(gs_line, "gpiointerrupt") < 0)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| gpiod_line_request_read_edge_events
interface/src/wire.c: In function 'wire_init':
interface/src/wire.c:79:15: error: implicit declaration of function 'gpiod_chip_ get_line'; did you mean 'gpiod_chip_get_info'? [-Wimplicit-function-declaration]
79 | gs_line = gpiod_chip_get_line(gs_chip, GPIO_DEVICE_LINE);
| ^~~~~~~~~~~~~~~~~~~
| gpiod_chip_get_info
interface/src/wire.c:79:13: error: assignment to 'struct gpiod_line *' from 'int ' makes pointer from integer without a cast [-Wint-conversion]
79 | gs_line = gpiod_chip_get_line(gs_chip, GPIO_DEVICE_LINE);
| ^
interface/src/wire.c: In function 'wire_read':
interface/src/wire.c:125:13: error: implicit declaration of function 'gpiod_line _is_requested'; did you mean 'gpiod_line_request_get_fd'? [-Wimplicit-function-d eclaration]
125 | if (gpiod_line_is_requested(gs_line) != 0)
| ^~~~~~~~~~~~~~~~~~~~~~~
| gpiod_line_request_get_fd
interface/src/wire.c:128:13: error: implicit declaration of function 'gpiod_line _release'; did you mean 'gpiod_line_request_release'? [-Wimplicit-function-decla ration]
128 | gpiod_line_release(gs_line);
| ^~~~~~~~~~~~~~~~~~
| gpiod_line_request_release
interface/src/wire.c:132:13: error: implicit declaration of function 'gpiod_line _request_input'; did you mean 'gpiod_line_request_get_fd'? [-Wimplicit-function- declaration]
132 | if (gpiod_line_request_input(gs_line, "gpio_input") != 0)
| ^~~~~~~~~~~~~~~~~~~~~~~~
| gpiod_line_request_get_fd
interface/src/wire.c:142:11: error: implicit declaration of function 'gpiod_line _get_value'; did you mean 'gpiod_line_request_get_value'? [-Wimplicit-function-d eclaration]
142 | res = gpiod_line_get_value(gs_line);
| ^~~~~~~~~~~~~~~~~~~~
| gpiod_line_request_get_value
interface/src/wire.c: In function 'wire_write':
interface/src/wire.c:175:13: error: implicit declaration of function 'gpiod_line _request_output'; did you mean 'gpiod_line_request_get_fd'? [-Wimplicit-function -declaration]
175 | if (gpiod_line_request_output(gs_line, "gpio_output", GPIOD_LINE _ACTIVE_STATE_HIGH) != 0)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| gpiod_line_request_get_fd
interface/src/wire.c:175:63: error: 'GPIOD_LINE_ACTIVE_STATE_HIGH' undeclared (f irst use in this function)
175 | if (gpiod_line_request_output(gs_line, "gpio_output", GPIOD_LINE_A CTIVE_STATE_HIGH) != 0)
| ^~~~~~~~~~~~ ~~~~~~~~~~~~~~~~

interface/src/wire.c:175:63: note: each undeclared identifier is reported only o nce for each function it appears in
interface/src/wire.c:185:9: error: implicit declaration of function 'gpiod_line_ set_value'; did you mean 'gpiod_line_request_set_value'? [-Wimplicit-function-de claration]
185 | if (gpiod_line_set_value(gs_line, value) != 0)
| ^~~~~~~~~~~~~~~~~~~~
| gpiod_line_request_set_value
interface/src/wire.c: In function 'wire_clock_init':
interface/src/wire.c:212:19: error: assignment to 'struct gpiod_line *' from 'in t' makes pointer from integer without a cast [-Wint-conversion]
212 | gs_clock_line = gpiod_chip_get_line(gs_clock_chip, GPIO_DEVICE_CLOCK _LINE);
| ^
interface/src/wire.c:222:65: error: 'GPIOD_LINE_ACTIVE_STATE_HIGH' undeclared (f irst use in this function)
222 | if (gpiod_line_request_output(gs_clock_line, "gpio_output", GPIOD_LINE_A CTIVE_STATE_HIGH) != 0)
| ^~~~~~~~~~~~ ~~~~~~~~~~~~~~~~

make: *** [Makefile:104: sx1262] Error 1

Thank you

Reproduce

No response

Expected behavior

No response

Additional context

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions