mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-10-29 17:54:14 +08:00
Merge pull request #544 from HiroGitea/fix/storm-const-sdcc46
Fix SDCC 4.6.0 const warnings in storm control
This commit is contained in:
2 files changed
+3
-3
No files matched your search
+1
-1
@@ -1574,7 +1574,7 @@ err:
|
|||||||
cmd_error("bw [in|out|status] <port> [<hexvalue>|off|drop|fc]\n");
|
cmd_error("bw [in|out|status] <port> [<hexvalue>|off|drop|fc]\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static __code char * __code storm_types[STORM_TYPES] = { "bcast", "mcast", "ucast", "umcast" };
|
static __code const char * __code const storm_types[STORM_TYPES] = { "bcast", "mcast", "ucast", "umcast" };
|
||||||
|
|
||||||
void parse_storm(void)
|
void parse_storm(void)
|
||||||
{
|
{
|
||||||
|
|||||||
+2
-2
@@ -8,7 +8,7 @@
|
|||||||
#pragma codeseg BANK3
|
#pragma codeseg BANK3
|
||||||
#pragma constseg BANK3
|
#pragma constseg BANK3
|
||||||
|
|
||||||
extern __code struct machine machine;
|
extern __code const struct machine machine;
|
||||||
extern __xdata uint8_t sfr_data[4];
|
extern __xdata uint8_t sfr_data[4];
|
||||||
|
|
||||||
/* RTL837X_STORM_MIDX words, row type * 2 + half: half 0 holds ports 0-4, half 1 ports 5-9,
|
/* RTL837X_STORM_MIDX words, row type * 2 + half: half 0 holds ports 0-4, half 1 ports 5-9,
|
||||||
@@ -20,7 +20,7 @@ static const __code uint8_t storm_midx[8][4] = {
|
|||||||
{ 0x2b, 0x9e, 0x37, 0xdb }, { 0x3f, 0xef, 0x7c, 0xef },
|
{ 0x2b, 0x9e, 0x37, 0xdb }, { 0x3f, 0xef, 0x7c, 0xef },
|
||||||
};
|
};
|
||||||
|
|
||||||
static __code char * __code storm_names[STORM_TYPES] = { " bcast ", " mcast ", " ucast ", " umcast " };
|
static __code const char * __code const storm_names[STORM_TYPES] = { " bcast ", " mcast ", " ucast ", " umcast " };
|
||||||
|
|
||||||
|
|
||||||
void storm_set(uint8_t port, __xdata uint8_t type, __xdata uint32_t rate, __xdata uint8_t pps) __banked
|
void storm_set(uint8_t port, __xdata uint8_t type, __xdata uint32_t rate, __xdata uint8_t pps) __banked
|
||||||
|
|||||||
Reference in new issue
Block a user