mirror of
https://github.com/drasko/codezero.git
synced 2026-01-15 12:23:15 +01:00
Kernel updates since December 2009
This commit is contained in:
12
conts/libdev/include/libdev/io.h
Normal file
12
conts/libdev/include/libdev/io.h
Normal file
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
* IO functions/macros.
|
||||
*
|
||||
* Copyright (C) 2007 Bahadir Balban
|
||||
*/
|
||||
#ifndef __LIBDEV_IO_H__
|
||||
#define __LIBDEV_IO_H__
|
||||
|
||||
#define read(address) *((volatile unsigned int *)(address))
|
||||
#define write(val, address) *((volatile unsigned int *)(address)) = val
|
||||
|
||||
#endif /* __LIBDEV_IO_H__ */
|
||||
23
conts/libdev/include/libdev/timer.h
Normal file
23
conts/libdev/include/libdev/timer.h
Normal file
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Generic timer library API
|
||||
*
|
||||
* Copyright (C) 2010 B Labs Ltd.
|
||||
*
|
||||
* Author: Bahadir Balban
|
||||
*/
|
||||
#ifndef __LIBDEV_TIMER_H__
|
||||
#define __LIBDEV_TIMER_H__
|
||||
|
||||
/*
|
||||
* Simple API for the primary timer
|
||||
* for userspace
|
||||
*/
|
||||
void timer_start(unsigned long timer_base);
|
||||
void timer_load(u32 val, unsigned long timer_base);
|
||||
u32 timer_read(unsigned long timer_base);
|
||||
void timer_stop(unsigned long timer_base);
|
||||
void timer_init_oneshot(unsigned long timer_base);
|
||||
void timer_init_periodic(unsigned long timer_base);
|
||||
void timer_init(unsigned long timer_base);
|
||||
|
||||
#endif /* __LIBDEV_TIMER_H__ */
|
||||
21
conts/libdev/include/libdev/uart.h
Normal file
21
conts/libdev/include/libdev/uart.h
Normal file
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Generic uart API
|
||||
*
|
||||
* Copyright (C) 2010 B Labs Ltd.
|
||||
*
|
||||
* Author: Bahadir Balban
|
||||
*/
|
||||
#ifndef __LIBDEV_UART_H__
|
||||
#define __LIBDEV_UART_H__
|
||||
|
||||
void uart_tx_char(unsigned long uart_base, char c);
|
||||
char uart_rx_char(unsigned long uart_base);
|
||||
void uart_set_baudrate(unsigned long uart_base, unsigned int val);
|
||||
void uart_init(unsigned long base);
|
||||
|
||||
/*
|
||||
* Base of primary uart used for printf
|
||||
*/
|
||||
extern unsigned long uart_print_base;
|
||||
|
||||
#endif /* __LIBDEV_UART_H__ */
|
||||
Reference in New Issue
Block a user