Skip to content

Commit

Permalink
platform_support: Marked platform_hwversion() as being value-consta…
Browse files Browse the repository at this point in the history
…nt for the all platforms
  • Loading branch information
dragonmux committed Jul 7, 2024
1 parent 744a338 commit ad0b6e8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/include/platform_support.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,16 @@
#if PC_HOSTED == 1
void platform_init(int argc, char **argv);
void platform_pace_poll(void);

#define BMD_CONST_FUNC
#else
void platform_init(void);

inline void platform_pace_poll(void)
{
}

#define BMD_CONST_FUNC __attribute__((const))
#endif

typedef struct platform_timeout platform_timeout_s;
Expand All @@ -51,7 +55,7 @@ void platform_delay(uint32_t ms);
extern bool connect_assert_nrst;
uint32_t platform_target_voltage_sense(void);
const char *platform_target_voltage(void);
int platform_hwversion(void);
int platform_hwversion(void) BMD_CONST_FUNC;
void platform_nrst_set_val(bool assert);
bool platform_nrst_get_val(void);
bool platform_target_get_power(void);
Expand Down

0 comments on commit ad0b6e8

Please sign in to comment.