switch mylib to bse namespace
This commit is contained in:
@ -12,6 +12,7 @@
|
|||||||
* Aenderungen von Michael Schoettner, HHU, 21.8.2016 *
|
* Aenderungen von Michael Schoettner, HHU, 21.8.2016 *
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#include "devices/CGA.h"
|
#include "devices/CGA.h"
|
||||||
|
#include "user/lib/MyLib.h"
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Methode: CGA::setpos *
|
* Methode: CGA::setpos *
|
||||||
@ -152,10 +153,10 @@ void CGA::scrollup() {
|
|||||||
/* Hier muss Code eingefuegt werden */
|
/* Hier muss Code eingefuegt werden */
|
||||||
|
|
||||||
// Move up
|
// Move up
|
||||||
mmem::memcpy<cga_line_t>((cga_line_t*)CGA_START, (cga_line_t*)CGA_START + 1, ROWS - 1);
|
bse::memcpy<cga_line_t>((cga_line_t*)CGA_START, (cga_line_t*)CGA_START + 1, ROWS - 1);
|
||||||
|
|
||||||
// Clear last line
|
// Clear last line
|
||||||
mmem::zero<cga_line_t>((cga_line_t*)CGA_START + ROWS - 1);
|
bse::zero<cga_line_t>((cga_line_t*)CGA_START + ROWS - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
@ -167,7 +168,7 @@ void CGA::clear() {
|
|||||||
|
|
||||||
/* Hier muess Code eingefuegt werden */
|
/* Hier muess Code eingefuegt werden */
|
||||||
|
|
||||||
mmem::zero<cga_page_t>((cga_page_t*)CGA_START);
|
bse::zero<cga_page_t>((cga_page_t*)CGA_START);
|
||||||
this->setpos(0, 0);
|
this->setpos(0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -15,7 +15,6 @@
|
|||||||
#define __CGA_include__
|
#define __CGA_include__
|
||||||
|
|
||||||
#include "kernel/IOport.h"
|
#include "kernel/IOport.h"
|
||||||
#include "user/lib/MyLib.h"
|
|
||||||
|
|
||||||
class CGA {
|
class CGA {
|
||||||
private:
|
private:
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
#include "user/lib/MyLib.h"
|
#include "user/lib/MyLib.h"
|
||||||
|
|
||||||
void mmem::memset(char* destination, char value, unsigned int bytes) {
|
void bse::memset(char* destination, char value, unsigned int bytes) {
|
||||||
for (unsigned int byte = 0; byte < bytes; ++byte) {
|
for (unsigned int byte = 0; byte < bytes; ++byte) {
|
||||||
*(destination + byte) = value;
|
*(destination + byte) = value;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
#ifndef __MYSTDLIB_INCLUDE_H_
|
#ifndef __MYSTDLIB_INCLUDE_H_
|
||||||
#define __MYSTDLIB_INCLUDE_H_
|
#define __MYSTDLIB_INCLUDE_H_
|
||||||
|
|
||||||
namespace mmem {
|
namespace bse {
|
||||||
template<typename T>
|
template<typename T>
|
||||||
void memcpy(T* destination, T* source, unsigned int count = 1) {
|
void memcpy(T* destination, T* source, unsigned int count = 1) {
|
||||||
for (unsigned int i = 0; i < count; ++i) {
|
for (unsigned int i = 0; i < count; ++i) {
|
||||||
@ -13,11 +13,11 @@ namespace mmem {
|
|||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
void zero(T* destination) {
|
void zero(T* destination) {
|
||||||
mmem::memset((char*)destination, '\0', sizeof(T));
|
memset((char*)destination, '\0', sizeof(T));
|
||||||
}
|
}
|
||||||
|
|
||||||
// void strcpy(char* destination, char* source);
|
// void strcpy(char* destination, char* source);
|
||||||
// unsigned int strlen(char* string);
|
// unsigned int strlen(char* string);
|
||||||
} // namespace mmem
|
} // namespace bse
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user