Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib: system: nuttx: fix undeclared parameter compile error #315

Merged
merged 1 commit into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/system/nuttx/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@

int metal_generic_dev_sys_open(struct metal_device *dev)
{
metal_unused(dev);
wyr-7 marked this conversation as resolved.
Show resolved Hide resolved

return 0;
}
1 change: 1 addition & 0 deletions lib/system/nuttx/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ struct metal_state _metal;
int metal_sys_init(const struct metal_init_params *params)
{
int ret = metal_cntr_irq_init();
metal_unused(params);
wyr-7 marked this conversation as resolved.
Show resolved Hide resolved

if (ret >= 0)
ret = metal_bus_register(&metal_generic_bus);
Expand Down
7 changes: 7 additions & 0 deletions lib/system/nuttx/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ static uint64_t metal_io_read_(struct metal_io_region *io,
int width)
{
uint64_t value = 0;
metal_unused(order);

metal_io_block_read(io, offset, &value, width);
return value;
Expand All @@ -25,6 +26,8 @@ static void metal_io_write_(struct metal_io_region *io,
memory_order order,
int width)
{
metal_unused(order);

metal_io_block_write(io, offset, &value, width);
}

Expand All @@ -35,6 +38,7 @@ static int metal_io_block_read_(struct metal_io_region *io,
int len)
{
void *va = metal_io_virt(io, offset);
metal_unused(order);

metal_cache_invalidate(va, len);
if (len == 1)
Expand All @@ -59,6 +63,7 @@ static int metal_io_block_write_(struct metal_io_region *io,
int len)
{
void *va = metal_io_virt(io, offset);
metal_unused(order);

if (len == 1)
*(uint8_t *)va = *(uint8_t *)src;
Expand All @@ -84,13 +89,15 @@ static void metal_io_block_set_(struct metal_io_region *io,
int len)
{
void *va = metal_io_virt(io, offset);
metal_unused(order);

memset(va, value, len);
metal_cache_flush(va, len);
}

static void metal_io_close_(struct metal_io_region *io)
{
metal_unused(io);
}

static metal_phys_addr_t metal_io_offset_to_phys_(struct metal_io_region *io,
Expand Down
3 changes: 3 additions & 0 deletions lib/system/nuttx/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
#ifndef __METAL_NUTTX_IO__H__
#define __METAL_NUTTX_IO__H__

#include <metal/utilities.h>

#ifdef __cplusplus
extern "C" {
#endif
Expand All @@ -39,6 +41,7 @@ struct metal_io_region *metal_io_get_region(void);
*/
static inline void metal_sys_io_mem_map(struct metal_io_region *io)
{
metal_unused(io);
}
#endif

Expand Down
Loading