Finish PC Speaker Support, and finish wait function
This commit is contained in:
parent
a29a7b5c50
commit
46b75085b6
@ -7,8 +7,10 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <arch/i686/io.h>
|
||||
#include <arch/i686/irq.h>
|
||||
|
||||
#include <util/binary.h>
|
||||
|
||||
#define CMOS_ADDPORT 0x70
|
||||
@ -83,10 +85,3 @@ int Slave_FDD_Detect()
|
||||
}
|
||||
return FDDType;
|
||||
}
|
||||
|
||||
void CMOS_Timer_Wait(int cycles)
|
||||
{
|
||||
int tmp;
|
||||
tmp = CMOS_Timer;
|
||||
while(CMOS_Timer - tmp <= cycles) return;
|
||||
}
|
||||
@ -10,7 +10,6 @@
|
||||
void CMOS_RTC_Handler();
|
||||
int Master_FDD_Detect();
|
||||
int Slave_FDD_Detect();
|
||||
void CMOS_Timer_Wait(int cycles);
|
||||
uint8_t Read_CMOS(uint8_t Register);
|
||||
|
||||
enum CMOSRegisters
|
||||
|
||||
@ -45,6 +45,6 @@ void PCSP_Mute()
|
||||
void PCSP_Beep()
|
||||
{
|
||||
PCSP_Play(1000);
|
||||
Timer_Wait(100000000);
|
||||
Timer_Wait(5);
|
||||
PCSP_Mute();
|
||||
}
|
||||
@ -5,15 +5,24 @@
|
||||
\*----------------*/
|
||||
#include "timer.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <dri/serial.h>
|
||||
|
||||
extern uint16_t DEBUG_COM_PORT;
|
||||
|
||||
int uptime;
|
||||
void Timer_Handler()
|
||||
{
|
||||
uptime++;
|
||||
}
|
||||
|
||||
void Timer_Wait(int cycles) // Seems to not work? i'll fix it later.
|
||||
void Timer_Wait(int time)
|
||||
{
|
||||
int tmp;
|
||||
tmp = uptime;
|
||||
while(uptime - tmp <= cycles) return;
|
||||
while(0 == 0) {
|
||||
// Serial_Printf(DEBUG_COM_PORT, "Vaules TMP: %d Uptime: %d Cycles: %d\n", tmp, uptime, time);
|
||||
if(uptime - tmp == time) return;
|
||||
}
|
||||
}
|
||||
@ -6,4 +6,4 @@
|
||||
#pragma once
|
||||
|
||||
void Timer_Handler();
|
||||
void Timer_Wait(int cycles);
|
||||
void Timer_Wait(int time);
|
||||
@ -6,4 +6,4 @@
|
||||
#pragma once
|
||||
|
||||
#define LOGO " _ _____ _ __________________\n / | / / | / | / / _/_ __/ ____/\n / |/ / /| | / |/ // / / / / __/ \n / /| / ___ |/ /| // / / / / /___ \n/_/ |_/_/ |_/_/ |_/___/ /_/ /_____/ \n"
|
||||
#define VERSION "RD-00047"
|
||||
#define VERSION "RD-00048"
|
||||
Loading…
x
Reference in New Issue
Block a user