All: Cleanup all files
Add newline to end of files and remove whitespace from end of lines
This commit is contained in:
parent
3441f63298
commit
dfe5a2d665
|
@ -1,6 +1,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <BAN/UniqPtr.h>
|
#include <BAN/UniqPtr.h>
|
||||||
|
#include <kernel/InterruptController.h>
|
||||||
#include <kernel/Networking/NetworkDriver.h>
|
#include <kernel/Networking/NetworkDriver.h>
|
||||||
#include <kernel/PCI.h>
|
#include <kernel/PCI.h>
|
||||||
|
|
||||||
|
@ -10,7 +11,7 @@
|
||||||
namespace Kernel
|
namespace Kernel
|
||||||
{
|
{
|
||||||
|
|
||||||
class E1000 final : public NetworkDriver
|
class E1000 final : public NetworkDriver, public Interruptable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static bool probe(PCI::Device&);
|
static bool probe(PCI::Device&);
|
||||||
|
@ -23,9 +24,11 @@ namespace Kernel
|
||||||
virtual bool link_up() override { return m_link_up; }
|
virtual bool link_up() override { return m_link_up; }
|
||||||
virtual int link_speed() override;
|
virtual int link_speed() override;
|
||||||
|
|
||||||
|
virtual void handle_irq() override { ASSERT_NOT_REACHED(); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
E1000() = default;
|
E1000(PCI::Device& pci_device) : m_pci_device(pci_device) {}
|
||||||
BAN::ErrorOr<void> initialize(PCI::Device&);
|
BAN::ErrorOr<void> initialize();
|
||||||
|
|
||||||
static void interrupt_handler();
|
static void interrupt_handler();
|
||||||
|
|
||||||
|
@ -40,11 +43,12 @@ namespace Kernel
|
||||||
void initialize_tx();
|
void initialize_tx();
|
||||||
|
|
||||||
void enable_link();
|
void enable_link();
|
||||||
void enable_interrupts();
|
BAN::ErrorOr<void> enable_interrupts();
|
||||||
|
|
||||||
void handle_receive();
|
void handle_receive();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
PCI::Device& m_pci_device;
|
||||||
BAN::UniqPtr<PCI::BarRegion> m_bar_region;
|
BAN::UniqPtr<PCI::BarRegion> m_bar_region;
|
||||||
bool m_has_eerprom { false };
|
bool m_has_eerprom { false };
|
||||||
uint8_t m_mac_address[6] {};
|
uint8_t m_mac_address[6] {};
|
||||||
|
|
|
@ -126,6 +126,9 @@ namespace Kernel::Input
|
||||||
|
|
||||||
auto key = KeyboardLayout::get().get_key_from_event(KeyEvent { .modifier = 0, .keycode = keycode.value() });
|
auto key = KeyboardLayout::get().get_key_from_event(KeyEvent { .modifier = 0, .keycode = keycode.value() });
|
||||||
|
|
||||||
|
if (key == Key::F1)
|
||||||
|
panic("OOF");
|
||||||
|
|
||||||
uint16_t modifier_mask = 0;
|
uint16_t modifier_mask = 0;
|
||||||
uint16_t toggle_mask = 0;
|
uint16_t toggle_mask = 0;
|
||||||
switch (key)
|
switch (key)
|
||||||
|
|
|
@ -495,7 +495,7 @@ int ungetc(int, FILE*);
|
||||||
|
|
||||||
int vfprintf(FILE* file, const char* format, va_list arguments)
|
int vfprintf(FILE* file, const char* format, va_list arguments)
|
||||||
{
|
{
|
||||||
return printf_impl(format, arguments, [](int c, void* file) { return fputc(c, (FILE*)file); }, file);
|
return printf_impl(format, arguments, [](int c, void* file) { return fputc(c, static_cast<FILE*>(file)); }, file);
|
||||||
}
|
}
|
||||||
|
|
||||||
int vfscanf(FILE* file, const char* format, va_list arguments)
|
int vfscanf(FILE* file, const char* format, va_list arguments)
|
||||||
|
|
|
@ -15,4 +15,3 @@ __targets() {
|
||||||
}
|
}
|
||||||
|
|
||||||
_arguments '*::targets:__targets'
|
_arguments '*::targets:__targets'
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue