Fixed linkage bug
With the new version of GCC(10.1.0) there was a problem about a variable definition.
This commit is contained in:
parent
75a597401c
commit
2c59006854
|
@ -6,7 +6,6 @@
|
||||||
|
|
||||||
// Start tick at zero
|
// Start tick at zero
|
||||||
uint32_t tick = 0;
|
uint32_t tick = 0;
|
||||||
|
|
||||||
static void timer_callback(registers_t regs) {
|
static void timer_callback(registers_t regs) {
|
||||||
tick++;
|
tick++;
|
||||||
/* uint8_t buf[8];
|
/* uint8_t buf[8];
|
||||||
|
@ -37,4 +36,4 @@ void init_timer(uint32_t frequency) {
|
||||||
// Send the frequency divisor
|
// Send the frequency divisor
|
||||||
outb(0x40, low);
|
outb(0x40, low);
|
||||||
outb(0x40, high);
|
outb(0x40, high);
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,11 +31,11 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void init_timer(uint32_t frequency);
|
void init_timer(uint32_t frequency);
|
||||||
uint32_t tick;
|
extern uint32_t tick;
|
||||||
/* Since regs parameter(from timer_callback) will be unused
|
/* Since regs parameter(from timer_callback) will be unused
|
||||||
* GCC(with -Werror flag) will throw an error, so we can avoid this
|
* GCC(with -Werror flag) will throw an error, so we can avoid this
|
||||||
* using the following macro
|
* using the following macro
|
||||||
*/
|
*/
|
||||||
#define UNUSED_PAR(x) (void)(x)
|
#define UNUSED_PAR(x) (void)(x)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue