Index: proj/interrupts_func.h
===================================================================
--- proj/interrupts_func.h	(revision 175)
+++ proj/interrupts_func.h	(nonexistent)
@@ -1,26 +0,0 @@
-#ifndef INTERRUPTS_FUNC_H_INCLUDED
-#define INTERRUPTS_FUNC_H_INCLUDED
-
-#include <stdint.h>
-
-/**
- * @brief Subscribes all drivers used (timer->keyboard->mouse)
- * @return ERROR_CODE code representing the result of the operation, SUCCESS code is returned if everything is OK
- * @see {_ERRORS_H_::errors}
- */
-int (subscribe_all)(void);
-
-/**
- * @brief Unsubscribes all subscribed interrupts
- * @return ERROR_CODE code representing the result of the operation, SUCCESS code is returned if everything is OK
- * @see {_ERRORS_H_::errors}
- */
-int (unsubscribe_all)(void);
-
-/**
- * @brief Calls interrupt handler corresponding to the bit specified by the argument.
- * @param handler Interrupt handler to call
- */
-void interrupt_handler(uint8_t handler);
-
-#endif /* end of include guard: INTERRUPTS_FUNC_H_INCLUDED */

Property changes on: proj/interrupts_func.h
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: proj/kbc_macros.h
===================================================================
--- proj/kbc_macros.h	(revision 175)
+++ proj/kbc_macros.h	(nonexistent)
@@ -1,56 +0,0 @@
-#ifndef KBC_MACROS_H_INCLUDED
-#define KBC_MACROS_H_INCLUDED
-
-/* KBC IRQ Line */
-
-#define KBC_IRQ     1   /* @brief KBC Controller IRQ Line */
-#define MOUSE_IRQ   12  /* @brief Mouse IRQ Line */
-
-/* Delay for KBC */
-#define DELAY           20000 /* @brief KBC Response Delay */
-#define KBC_NUM_TRIES   20    /* @brief Number of tries to issue command before timeout */
-
-/* I/O Ports Addresses */
-
-#define KBC_CMD     0x64 /* @brief Address to send commands to KBC */
-#define KBC_CMD_ARG 0x60 /* @brief Address to write KBC Command Arguments */
-#define STATUS_REG  0x64 /* @brief KBC Status Register address */
-
-#define OUTPUT_BUF  0x60 /* @brief Address of Output Buffer of KBC */
-
-/* KBC Commands */
-#define READ_KBC_CMD    0x20 /* @brief Read KBC Command Byte */
-#define WRITE_KBC_CMD   0x60 /* @brief Write KBC Command Byte */
-#define KBC_SELF_TEST   0xAA /* @brief KBC Diagnostic Tests */
-#define KBC_INT_TEST    0xAB /* @brief Tests Keyboard Clock and Data lines */
-#define KBC_INT_DISABLE 0xAD /* @brief Disable KBC Interface */
-#define KBC_INT_ENABLE  0xAE /* @brief Enable KBC Interface */
-#define MOUSE_DISABLE   0xA7 /* @brief Disable Mouse */
-#define MOUSE_ENABLE    0xA8 /* @brief Enable Mouse */
-#define MOUSE_INT_TEST  0xA9 /* @brief Tests Mouse data line */
-#define MOUSE_WRITE_B   0xD4 /* @brief Write a byte directly to the mouse */
-
-/* Status Byte Masking */
-
-#define OUT_BUF_FUL     BIT(0) /* @brief Output Buffer State */
-#define IN_BUF_FULL     BIT(1) /* @brief Input Buffer State */
-#define SYS_FLAG        BIT(2) /* @brief System Flag */
-#define DATA_CMD_WRITE  BIT(3) /* @brief Identifier of type of byte in input buffer */
-#define INH_FLAG        BIT(4) /* @brief Keyboard inihibited */
-#define AUX_MOUSE       BIT(5) /* @brief Mouse Data */
-#define TIME_OUT_REC    BIT(6) /* @brief Time Out Error - Invalid Data */
-#define PARITY_ERROR    BIT(7) /* @brief Parity Error - Invalid Data */
-
-/* Scancode Constants */
-
-#define ESC_BREAK_CODE  0x81    /* @brief ESC Break Code */
-#define TWO_BYTE_CODE   0xE0    /* @brief First byte of a two byte Scancode */
-#define BREAK_CODE_BIT  BIT(7)  /* @brief Bit to distinguish between Make code and Break code */
-
-/* Command byte masks */
-#define INT_KBD         BIT(0)  /* @brief Enable Keyboard Interrupts */
-#define INT_MOU         BIT(1)  /* @brief Enable Mouse Interrupts */
-#define DIS_KBD         BIT(4)  /* @brief Disable Keyboard */
-#define DIS_MOU         BIT(5)  /* @brief Disable Mouse */
-
-#endif //KBC_MACROS_H_INCLUDED

Property changes on: proj/kbc_macros.h
___________________________________________________________________
Deleted: svn:executable
Index: proj/mouse.h
===================================================================
--- proj/mouse.h	(revision 175)
+++ proj/mouse.h	(nonexistent)
@@ -1,91 +0,0 @@
-#ifndef MOUSE_H_INCLUDED
-#define MOUSE_H_INCLUDED
-
-#include <stdint.h>
-
-/**
- * @brief Subscribes Mouse Interrupts and disables Minix Default IH
- * @param interrupt_bit Bit of Interrupt Vector that will be set when Mouse Interrupt is pending
- * @param interrupt_id Mouse Interrupt ID to specify the Mouse Interrupt in other calls
- * @return ERROR_CODE code representing the result of the operation, SUCCESS code is returned if everything is OK
- * @see {_ERRORS_H_::errors}
- */
-int (subscribe_mouse_interrupt)(uint8_t interrupt_bit, int *interrupt_id);
-
-//These have to do with mouse_ih
-int got_error_mouse_ih;
-uint8_t packet_mouse_ih[3];
-int counter_mouse_ih;
-
-/**
- * @brief   Parse 3 bytes and returns it as a parsed, struct packet.
- * @param   packet_bytes    array of bytes to parse
- * @return  parsed struct packet
- */
-struct packet (mouse_parse_packet)(const uint8_t *packet_bytes);
-
-/**
- * @brief Polls mouse for data. Blocks execution until a valid mouse packet is obtained.
- * @param   pp      pointer to packet struct in which the result will be stored
- * @param   period  time (in milliseconds) the poller should wait between pollings of bytes
- * @return ERROR_CODE code representing the result of the operation, SUCCESS code is returned if everything is OK
- */
-int mouse_poll(struct packet *pp, uint16_t period);
-
-/**
- * @brief Sets data report mode for mouse
- * @param   on  zero to disable data report, any other value to enable data report
- * @return  ERROR_CODE code representing the result of the operation, SUCCESS code is returned if everything is OK
- */
-int (mouse_set_data_report)(int on);
-
-/**
- * @brief Reads data byte from mouse
- * <summary>
- * Polls the mouse till data is available for reading
- * </summary>
- * @param data Pointer to variable where byte read from mouse will be stored
- * @return ERROR_CODE code representing the result of the operation, SUCCESS code is returned if everything is OK
- * @see {_ERRORS_H_::errors}
- */
-int (mouse_read_data)(uint8_t *data, uint16_t period);
-
-/**
- * @brief Issues command to mouse
- * <summary>
- * Issues command to mouse, returns error after two consecutive errors reported by the acknowledgment byte
- * </summary>
- * @param cmd Command to be issued
- * @return ERROR_CODE code representing the result of the operation, SUCCESS code is returned if everything is OK
- * @see {_ERRORS_H_::errors}
- */
-int (mouse_issue_cmd)(uint32_t cmd);
-
-/**
- * @brief Reads byte from mouse
- * <summary>
- * Reads byte from mouse, giving error if exceeds number of tries to read
- * </summary>
- * @param byte Pointer to variable where byte read from mouse will be stored
- * @return ERROR_CODE code representing the result of the operation, SUCCESS code is returned if everything is OK
- * @see {_ERRORS_H_::errors}
- */
-int (mouse_read_byte)(uint8_t *byte);
-
-/**
- * @brief Polls OUT_BUF for byte coming from mouse.
- * @param   byte    pointer to byte read from OUT_BUF
- * @param   period  time (in milliseconds) the poller should wait between pollings of bytes
- * @return ERROR_CODE code representing the result of the operation, SUCCESS code is returned if everything is OK
- */
-int (mouse_poll_byte)(uint8_t *byte, uint16_t period);
-
-/**
- * @brief Converts 9-bit number to 16-bit with sign extension
- * @param sign_bit  Sign bit identifiying the signal of the number
- * @param byte      Least significant byte that will be extended
- * @return Extended 9-bit number
- */
-int16_t (sign_extend_byte)(uint8_t sign_bit, uint8_t byte);
-
-#endif //MOUSE_H_INCLUDED

Property changes on: proj/mouse.h
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: proj/kbc.h
===================================================================
--- proj/kbc.h	(revision 175)
+++ proj/kbc.h	(nonexistent)
@@ -1,55 +0,0 @@
-/**
- * This file concerns everything related to the KBC (KeyBoard Controller, which
- * actually also manages the mouse)
- */
-
-#ifndef KBC_H_INCLUDED
-#define KBC_H_INCLUDED
-
-/**
- * @brief High-level function that reads the command byte of the KBC
- * @param cmd Pointer to variable where command byte read from KBC will be stored
- * @return 0 if operation was successful, 1 otherwise
- */
-int (kbc_read_cmd)(uint8_t *cmd);
-
-/**
- * @brief High-level function that changes the command byte of the KBC
- * @param cmd New value for command byte of KBC
- * @return 0 if operation was successful, 1 otherwise
- */
-int (kbc_change_cmd)(uint8_t cmd);
-
-/**
- * @brief High-level function that restores KBC to normal state
- * High-level function that restores KBC to normal state, because lcf_start
- * changes the command byte of KBC. If this function is not used, there is a
- * chance that the keyboard and keyboard interrupts remain disabled.
- * @return 0 if operation was successful, 1 otherwise
- */
-int (kbc_restore_keyboard)();
-
-/**
- * @brief Low-level function to issue a command to keyboard
- * @param cmd command to be issued
- * @return 0 if operation was successful, 1 otherwise
- */
-int (kbc_issue_cmd)(uint8_t cmd);
-
-/**
- * @brief Low-level function to issue an argument of a command
- * @param cmd argument to be issued
- * @return 0 if operation was successful, 1 otherwise
- */
-int (kbc_issue_arg)(uint8_t arg);
-
-/**
- * @brief Low-level function for reading byte from keyboard
- * Low-level function for reading byte from keyboard. Waits until output buffer
- * is full
- * @param value Pointer to variable where byte read from keyboard will be stored
- * @return 0 if operation was successful, 1 otherwise
- */
-int (kbc_read_byte)(uint8_t *byte);
-
-#endif //KBC_H_INCLUDED

Property changes on: proj/kbc.h
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: proj/i8254.h
===================================================================
--- proj/i8254.h	(revision 175)
+++ proj/i8254.h	(nonexistent)
@@ -1,64 +0,0 @@
-#ifndef _LCOM_I8254_H_
-#define _LCOM_I8254_H_
-
-#include <lcom/lcf.h>
-
-/** @defgroup i8254 i8254
- *
- * Constants for programming the i8254 Timer. Needs to be completed.
- */
-
-#define TIMER_FREQ     1193182                                                          /**< @brief clock frequency for timer in PC and AT */
-#define TIMER_MIN_FREQ (TIMER_FREQ/UINT16_MAX) + ((TIMER_FREQ % UINT16_MAX) ? 1 : 0)    /**< @brief mininum frequency for timer */
-#define TIMER0_IRQ     0                                                                /**< @brief Timer 0 IRQ line */
-
-/* I/O port addresses */
-
-#define TIMER_0    0x40         /**< @brief Timer 0 count register */
-#define TIMER_1    0x41         /**< @brief Timer 1 count register */
-#define TIMER_2    0x42         /**< @brief Timer 2 count register */
-#define TIMER_CTRL 0x43         /**< @brief Control register */
-
-#define SPEAKER_CTRL 0x61       /**< @brief Register for speaker control  */
-
-/* Timer control */
-
-/* Timer selection: bits 7 and 6 */
-
-#define TIMER_SEL0   0x00              /**< @brief Control Word for Timer 0 */
-#define TIMER_SEL1   BIT(6)            /**< @brief Control Word for Timer 1 */
-#define TIMER_SEL2   BIT(7)            /**< @brief Control Word for Timer 2 */
-#define TIMER_RB_CMD (BIT(7) | BIT(6)) /**< @brief Read Back Command */
-
-/* Register selection: bits 5 and 4 */
-
-#define TIMER_LSB     BIT(4)                    /**< @brief Initialize Counter LSB only */
-#define TIMER_MSB     BIT(5)                    /**< @brief Initialize Counter MSB only */
-#define TIMER_LSB_MSB (TIMER_LSB | TIMER_MSB)   /**< @brief Initialize LSB first and MSB afterwards */
-#define TIMER_INMODE_MASK 0x30                  /**< @brief Mask for Timer Counter Mode */
-#define TIMER_INMODE_POS  4                     /**< @brief Bit position of Timer Counter Mode */
-
-/* Operating mode: bits 3, 2 and 1 */
-
-#define TIMER_SQR_WAVE (BIT(2) | BIT(1)) /**< @brief Mode 3: square wave generator */
-#define TIMER_RATE_GEN BIT(2)            /**< @brief Mode 2: rate generator */
-#define TIMER_MODE_MASK 0x0E             /**< @brief Mask for mode */
-#define TIMER_MODE_POS  1                /**< @brief Position of smallest bit from mode */
-#define TIMER_MODE_2ALT 0x6              /**< @brief Alternative notation for mode 2 */
-#define TIMER_MODE_3ALT 0x7              /**< @brief Alternative notation for mode 3 */
-#define TIMER_MODE_RED2 0x03             /**< @brief Reduce 3-bit mode to 2-bit mode */
-
-/* Counting mode: bit 0 */
-
-#define TIMER_BCD 0x01 /**< @brief Count in BCD */
-#define TIMER_BIN 0x00 /**< @brief Count in binary */
-
-/* READ-BACK COMMAND FORMAT */
-
-#define TIMER_RB_COUNT_  BIT(5)         /**< @brief Read counter value on read-back (0 to activate) */
-#define TIMER_RB_STATUS_ BIT(4)         /**< @brief Read status value on read-back (0 to activate) */
-#define TIMER_RB_SEL(n)  BIT((n) + 1)   /**< @brief Select timer to read information from */
-
-/**@}*/
-
-#endif /* _LCOM_I8254_H */

Property changes on: proj/i8254.h
___________________________________________________________________
Deleted: svn:executable
Index: proj/utils.h
===================================================================
--- proj/utils.h	(revision 175)
+++ proj/utils.h	(nonexistent)
@@ -1,53 +0,0 @@
-#ifndef UTILS_H_INCLUDED
-#define UTILS_H_INCLUDED
-
-/**
- * @brief Gets the least significant byte of a 16-bit variable
- * @param val 16-bit variable
- * @param lsb Pointer to a 8-bit variable to store the value of the LSB
- * @return ERROR_CODE code representing the result of the operation, SUCCESS code is returned if everything is OK
- */
-int(util_get_LSB)(uint16_t val, uint8_t *lsb);
-
-/**
- * @brief Gets the most significant byte of a 16-bit variable
- * @param val 16-bit variable
- * @param lsb Pointer to a 8-bit variable to store the value of the MSB
- * @return ERROR_CODE code representing the result of the operation, SUCCESS code is returned if everything is OK
- */
-int(util_get_MSB)(uint16_t val, uint8_t *msb);
-
-/**
- * @brief sys_inb wrapper
- * @param port Port to read from
- * @param value Pointer to byte to store value read
- * @return ERROR_CODE code representing the result of the operation, SUCCESS code is returned if everything is OK
- */
-int (util_sys_inb)(int port, uint8_t *value);
-
-/**
- * @brief Unsubcribes Interrupts
- * @param interrupt_id Interrupt ID, value via arguments on subscription of the interrupt_id
- * @see subscribe_kbc_interrupt, subscribe_timer_interrupt
- * @return ERROR_CODE code representing the result of the operation, SUCCESS code is returned if everything is OK
- */
-int (unsubscribe_interrupt)(int *interrupt_id);
-
-/**
- * @brief Gets the minimum value out of two values.
- * @param a     First value
- * @param b     Second value
- * @return  The minimum of the two values
- */
-int32_t min(int32_t a, int32_t b);
-
-/**
- * @brief Gets the maximum value out of two values.
- * @param a     First value
- * @param b     Second value
- * @return  The maximum of the two values
- */
-int32_t max(int32_t a, int32_t b);
-
-
-#endif //UTILS_H_INCLUDED

Property changes on: proj/utils.h
___________________________________________________________________
Deleted: svn:executable
Index: proj/keyboard.h
===================================================================
--- proj/keyboard.h	(revision 175)
+++ proj/keyboard.h	(nonexistent)
@@ -1,26 +0,0 @@
-/**
- * This file concerns everything related to the keyboard
- */
-
-#ifndef KEYBOARD_H_INCLUDED
-#define KEYBOARD_H_INCLUDED
-
-/**
- * @brief Subscribes Keyboard Interrupts and disables Minix Default IH
- * @param interrupt_bit Bit of Interrupt Vector that will be set when Keyboard Interrupt is pending
- * @param interrupt_id Keyboard Interrupt ID to specify the Keyboard Interrupt in other calls
- * @return ERROR_CODE code representing the result of the operation, SUCCESS code is returned if everything is OK
- * @see {_ERRORS_H_::errors}
- */
-int (subscribe_kbc_interrupt)(uint8_t interrupt_bit, int *interrupt_id);
-
-uint8_t scancode[2];
-int done;
-int sz;
-int got_error_keyboard;
-
-void (kbc_ih)(void);
-
-int (keyboard_poll)(uint8_t bytes[], uint8_t *size);
-
-#endif //KEYBOARD_H_INCLUDED

Property changes on: proj/keyboard.h
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: proj/graph_macros.h
===================================================================
--- proj/graph_macros.h	(revision 175)
+++ proj/graph_macros.h	(nonexistent)
@@ -1,32 +0,0 @@
-#ifndef GRAPHICS_MACROS_H_INCLUDED
-#define GRAPHICS_MACROS_H_INCLUDED
-
-#define VC_BIOS_SERV  0x10 /** @brief Interrupt service of video card */
-#define VBE_CALL      0x4F /** @brief VBE call function specifier */
-
-#define MBYTE_BASE  0x0         /** @brief Base address (zero address) */
-#define MBYTE_SIZE  0xFFFFF     /** @brief Size of a mebibyte */
-
-// Graphics Functions
-#define VBE_CTRL_INFO       0x00    /** @brief Get VBE Controller Information */
-#define VBE_MD_INFO         0x01    /** @brief Get VBE Mode Information */
-#define SET_VBE_MD          0x02    /** @brief Set VBE Mode */
-
-// Error codes (AH)
-#define AH_SUCCESS          0x00    /** @brief Success code on BIOS call */
-#define AH_FUNC_CALL_FAIL   0x01    /** @brief Function call failed */
-#define AH_FUNC_NOT_SUPP    0x02    /** @brief Function call is not supported in current HW configuration */
-#define AH_FUNC_INVALID     0x03    /** @brief Invalid function in current video mode */
-
-// Graphics modes
-#define INDEXED_1024_768        0x105
-#define DIRECT_640_480          0x110
-#define DIRECT_800_600          0x115
-#define DIRECT_1280_1024_565    0x11A
-#define DIRECT_1280_1024_888    0x11B
-#define LINEAR_FRAME_BUFFER_MD  BIT(14)
-
-// Colors in RBG (8 bit)
-#define BLACK               0x000000
-
-#endif /* end of include guard: GRAPHICS_MACROS_H_INCLUDED */

Property changes on: proj/graph_macros.h
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: proj/errors.h
===================================================================
--- proj/errors.h	(revision 175)
+++ proj/errors.h	(nonexistent)
@@ -1,21 +0,0 @@
-#ifndef ERRORS_H_INCLUDED
-#define ERRORS_H_INCLUDED
-
-/** @brief Error Codes */
-enum errors {
-    SUCCESS = 0,        /* @brief Sucessful */
-    NULL_PTR,           /* @brief Null Pointer Error */
-    LCF_ERROR,          /* @brief Error originated on LCF */
-    SBCR_ERROR,         /* @brief Error on Subscribing Interrupt */
-    UNSBCR_ERROR,       /* @brief Error on Unsubscring Interrupt*/
-    READ_ERROR,         /* @brief Error on Reading from Port */
-    WRITE_ERROR,        /* @brief Error on Writing to Port */
-    TIMEOUT_ERROR,      /* @brief Timeout error */
-    INVALID_COMMAND,    /* @brief Invalid Command issued */
-    INVALID_STATE,      /* @brief State machine reached an invalid state */
-    BIOS_CALL_ERROR,    /* @brief Error upon BIOS call */
-    OUT_OF_RANGE,       /* @brief Accessing area out of range of memory */
-    OTHER_ERROR         /* @brief Unspecified error */
-};
-
-#endif //ERRORS_H_INCLUDED

Property changes on: proj/errors.h
___________________________________________________________________
Deleted: svn:executable
Index: proj/proj_macros.h
===================================================================
--- proj/proj_macros.h	(revision 175)
+++ proj/proj_macros.h	(nonexistent)
@@ -1,31 +0,0 @@
-#ifndef PROJ_MACROS_H_INCLUDED
-#define PROJ_MACROS_H_INCLUDED
-
-// WASD Movement Keys
-#define W_MAKE_CODE     0x11    /** @brief W Make Code */
-#define W_BREAK_CODE    0x91    /** @brief W Break Code */
-#define A_MAKE_CODE     0x1E    /** @brief A Make Code */
-#define A_BREAK_CODE    0x9E    /** @brief A Break Code */
-#define S_MAKE_CODE     0x1F    /** @brief S Make Code */
-#define S_BREAK_CODE    0x9F    /** @brief S Break Code */
-#define D_MAKE_CODE     0x20    /** @brief D Make Code */
-#define D_BREAK_CODE    0xA0    /** @brief D Break Code */
-
-// Movement Directions
-#define UP      -1  /** @brief Moving to the top side of screen */
-#define DOWN    1   /** @brief Moving to the bottom side of screen */
-#define LEFT    -1  /** @brief Moving to the left side of screen */
-#define RIGHT   1   /** @brief Moving to the right side of screen */
-#define REST    0   /** @brief Not moving */
-
-// Extra Keys
-#define ESC_MAKE_CODE   0x01    /** @brief ESC Make Code */
-#define ESC_BREAK_CODE  0x81    /** @brief ESC Break Code */
-
-// Refresh Rate
-#define REFRESH_RATE    60      /** @brief Screen refresh rate */
-
-//Graphics mode
-#define GRAPH_MODE      DIRECT_1280_1024_888 /** @brief Graphic mode used */
-
-#endif /* end of include guard: PROJ_MACROS_H_INCLUDED */

Property changes on: proj/proj_macros.h
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: proj/fast_math.h
===================================================================
--- proj/fast_math.h	(revision 175)
+++ proj/fast_math.h	(nonexistent)
@@ -1,7 +0,0 @@
-#ifndef FAST_MATH_H_INCLUDED
-#define FAST_MATH_H_INCLUDED
-
-double fm_sin(double x);
-double fm_cos(double x);
-
-#endif //FAST_MATH_H_INCLUDED

Property changes on: proj/fast_math.h
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: proj/timer.h
===================================================================
--- proj/timer.h	(revision 175)
+++ proj/timer.h	(nonexistent)
@@ -1,14 +0,0 @@
-/**
- * This file concerns everything related to the timer
- */
-
-#ifndef TIMER_H_INCLUDED
-#define TIMER_H_INCLUDED
-
-#include <stdint.h>
-
-int (subscribe_timer_interrupt)(uint8_t interrupt_bit, int *interrupt_id);
-
-uint32_t no_interrupts;
-
-#endif //TIMER_H_INCLUDED

Property changes on: proj/timer.h
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: proj/mouse_macros.h
===================================================================
--- proj/mouse_macros.h	(revision 175)
+++ proj/mouse_macros.h	(nonexistent)
@@ -1,37 +0,0 @@
-#ifndef MOUSE_MACROS_H_INCLUDED
-#define MOUSE_MACROS_H_INCLUDED
-
-/* Mouse Data Packet */
-// Byte 0 - Button States
-#define LEFT_BUTTON     BIT(0) /* @brief Left button click event*/
-#define RIGHT_BUTTON    BIT(1) /* @brief Right button click event */
-#define MIDDLE_BUTTON   BIT(2) /* @brief Middle button click event */
-#define FIRST_BYTE_ID   BIT(3) /* @brief Identifier of first byte of packet CAREFUL: Not 100% accurate */
-#define MSB_X_DELTA     BIT(4) /* @brief Most significant bit of X delta */
-#define MSB_Y_DELTA     BIT(5) /* @brief Most significant bit of Y delta */
-#define X_OVERFLOW      BIT(6) /* @brief X delta overflowed */
-#define Y_OVERFLOW      BIT(7) /* @brief Y delta overflowed */
-// Byte 1 - X delta
-// Byte 2 - Y delta
-
-/* Mouse Commands */
-#define RESET           0xFF /* @brief Reset mouse */
-#define RESEND          0xFE /* @brief Resend command */
-#define DEFAULT         0xF6 /* @brief Set default values */
-#define DIS_DATA_REP    0xF5 /* @brief Disable Data Reporting */
-#define ENABLE_DATA_REP 0xF4 /* @brief Enable Data Reporting */
-#define SET_SAMPLE_RT   0xF3 /* @brief Sets state sampling rate */
-#define SET_REMOTE_MD   0xF0 /* @brief Sets Mouse on Remote Mode, data on request */
-#define READ_DATA       0xEB /* @brief Sends data packet request */
-#define SET_STREAM_MD   0xEA /* @brief Sets mouse on Stream Mode, data on events */
-#define STATUS_REQUEST  0xE9 /* @brief Get mouse configuration */
-#define SET_RESOLUTION  0xE8 /* @brief Sets resolution for mouse movement */
-#define SCALING_ACC_MD  0xE7 /* @brief Sets scaling on acceleration mode */
-#define SCALING_LIN_MD  0xE6 /* @brief Sets scaling on linear mode */
-
-/* Mouse Controller Responses */
-#define ACK_OK      0xFA /* @brief Operation sucessful */
-#define ACK_INVALID 0xFE /* @brief Invalid Byte, first occurence */
-#define ACK_ERROR   0xFC /* @brief Invalid Byte on resend */
-
-#endif // MOUSE_MACROS_H_INCLUDED

Property changes on: proj/mouse_macros.h
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: proj/graph.h
===================================================================
--- proj/graph.h	(revision 175)
+++ proj/graph.h	(nonexistent)
@@ -1,46 +0,0 @@
-#ifndef GRAPH_H_INCLUDED
-#define GRAPH_H_INCLUDED
-
-#include <lcom/lcf.h>
-#include <stdint.h>
-
-/// MACROS
-//#define GET_ALP(n)          (0xFF & ((n) >> 24))
-#define GET_RED(n)          (0xFF & ((n) >> 16))
-#define GET_GRE(n)          (0xFF & ((n) >>  8))
-#define GET_BLU(n)          (0xFF & (n      ))
-//#define SET_ALP(n)          (((n)&0xFF) << 24)
-#define SET_RED(n)          (((n)&0xFF) << 16)
-#define SET_GRE(n)          (((n)&0xFF) <<  8)
-#define SET_BLU(n)          (((n)&0xFF)      )
-#define SET_RGB(r,g,b)      (SET_RED(r) | SET_GRE(g) | SET_BLU(b))
-
-/// PUBLIC GET
-uint16_t   (graph_get_XRes)         (void);
-uint16_t   (graph_get_YRes)         (void);
-
-/// INIT
-int (graph_init)(uint16_t mode);
-
-/// CLEANUP
-int (graph_cleanup)(void);
-
-/// PIXEL DRAWING
-int (graph_set_pixel)      (uint16_t x, uint16_t y, uint32_t color);
-int (graph_set_pixel_alpha)(uint16_t x, uint16_t y, uint32_t color, uint8_t alpha);
-
-/// SCREEN
-int (graph_clear_screen)(void);
-
-/// DRAW
-int (graph_draw)(void);
-
-
-
-/// RECTANGLE
-
-
-int (graph_draw_hline)(uint16_t x, uint16_t y, uint16_t len, uint32_t color);
-int (graph_draw_rectangle)(uint16_t x, uint16_t y,uint16_t width, uint16_t height, uint32_t color);
-
-#endif /* end of include guard: GRAPH_H_INCLUDED */

Property changes on: proj/graph.h
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: proj/sprite.h
===================================================================
--- proj/sprite.h	(revision 175)
+++ proj/sprite.h	(nonexistent)
@@ -1,23 +0,0 @@
-#ifndef SPRITE_H_INCLUDED
-#define SPRITE_H_INCLUDED
-
-struct sprite;
-typedef struct sprite sprite_t;
-
-sprite_t* (sprite_ctor)(const char **xpm, int u0, int v0);
-void      (sprite_dtor)(sprite_t *p);
-
-void (sprite_set_x)     (sprite_t *p, int16_t x);
-void (sprite_set_y)     (sprite_t *p, int16_t y);
-void (sprite_set_pos)   (sprite_t *p, int16_t x, int16_t y);
-void (sprite_set_angle) (sprite_t *p, double angle);
-void (sprite_set_center)(sprite_t *p, int16_t u0, int16_t v0);
-
-int sprite_get_x(const sprite_t *p);
-int sprite_get_y(const sprite_t *p);
-int sprite_get_w(const sprite_t *p);
-int sprite_get_h(const sprite_t *p);
-
-void (sprite_draw)(const sprite_t *p);
-
-#endif //SPRITE_H_INCLUDED

Property changes on: proj/sprite.h
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: proj/proj_func.h
===================================================================
--- proj/proj_func.h	(revision 175)
+++ proj/proj_func.h	(nonexistent)
@@ -1,45 +0,0 @@
-#ifndef PROJ_FUNC_H_INCLUDED
-#define PROJ_FUNC_H_INCLUDED
-
-#include "sprite.h"
-
-/**
- * @brief Cleans up all memory, unsubscribes interrupts.
- * @return ERROR_CODE code representing the result of the operation, SUCCESS code is returned if everything is OK
- * @see {_ERRORS_H_::errors}
- */
-int cleanup(void);
-
-/**
- * @brief Updates movement variables.
- */
-void update_movement(void);
-
-void update_mouse_position(struct packet *p);
-
-int32_t get_mouse_X(void);
-
-int32_t get_mouse_Y(void);
-
-/**
- * @brief
- * @param
- * @param
- * @param
- * @return Angle
- */
-double get_mouse_angle(sprite_t *p);
-
-/**
- * @brief Get horizontal movement direction.
- * @return Horizontal movement direction (-1 -> heading LEFT; 0 -> not moving horizontally; 1 -> heading RIGHT)
- */
-int get_hor_movement(void);
-
-/**
- * @brief Get vertical movement direction.
- * @return Vertical movement direction (-1 -> heading UP; 0 -> not moving vertically; 1 -> heading DOWN)
- */
-int get_ver_movement(void);
-
-#endif /* end of include guard: PROJ_FUNC_H_INCLUDED */

Property changes on: proj/proj_func.h
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: proj/include/errors.h
===================================================================
--- proj/include/errors.h	(nonexistent)
+++ proj/include/errors.h	(revision 176)
@@ -0,0 +1,21 @@
+#ifndef ERRORS_H_INCLUDED
+#define ERRORS_H_INCLUDED
+
+/** @brief Error Codes */
+enum errors {
+    SUCCESS = 0,        /* @brief Sucessful */
+    NULL_PTR,           /* @brief Null Pointer Error */
+    LCF_ERROR,          /* @brief Error originated on LCF */
+    SBCR_ERROR,         /* @brief Error on Subscribing Interrupt */
+    UNSBCR_ERROR,       /* @brief Error on Unsubscring Interrupt*/
+    READ_ERROR,         /* @brief Error on Reading from Port */
+    WRITE_ERROR,        /* @brief Error on Writing to Port */
+    TIMEOUT_ERROR,      /* @brief Timeout error */
+    INVALID_COMMAND,    /* @brief Invalid Command issued */
+    INVALID_STATE,      /* @brief State machine reached an invalid state */
+    BIOS_CALL_ERROR,    /* @brief Error upon BIOS call */
+    OUT_OF_RANGE,       /* @brief Accessing area out of range of memory */
+    OTHER_ERROR         /* @brief Unspecified error */
+};
+
+#endif //ERRORS_H_INCLUDED

Property changes on: proj/include/errors.h
___________________________________________________________________
Added: svn:executable
Index: proj/include/fast_math.h
===================================================================
--- proj/include/fast_math.h	(nonexistent)
+++ proj/include/fast_math.h	(revision 176)
@@ -0,0 +1,7 @@
+#ifndef FAST_MATH_H_INCLUDED
+#define FAST_MATH_H_INCLUDED
+
+double fm_sin(double x);
+double fm_cos(double x);
+
+#endif //FAST_MATH_H_INCLUDED

Property changes on: proj/include/fast_math.h
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: proj/include/graph.h
===================================================================
--- proj/include/graph.h	(nonexistent)
+++ proj/include/graph.h	(revision 176)
@@ -0,0 +1,46 @@
+#ifndef GRAPH_H_INCLUDED
+#define GRAPH_H_INCLUDED
+
+#include <lcom/lcf.h>
+#include <stdint.h>
+
+/// MACROS
+//#define GET_ALP(n)          (0xFF & ((n) >> 24))
+#define GET_RED(n)          (0xFF & ((n) >> 16))
+#define GET_GRE(n)          (0xFF & ((n) >>  8))
+#define GET_BLU(n)          (0xFF & (n      ))
+//#define SET_ALP(n)          (((n)&0xFF) << 24)
+#define SET_RED(n)          (((n)&0xFF) << 16)
+#define SET_GRE(n)          (((n)&0xFF) <<  8)
+#define SET_BLU(n)          (((n)&0xFF)      )
+#define SET_RGB(r,g,b)      (SET_RED(r) | SET_GRE(g) | SET_BLU(b))
+
+/// PUBLIC GET
+uint16_t   (graph_get_XRes)         (void);
+uint16_t   (graph_get_YRes)         (void);
+
+/// INIT
+int (graph_init)(uint16_t mode);
+
+/// CLEANUP
+int (graph_cleanup)(void);
+
+/// PIXEL DRAWING
+int (graph_set_pixel)      (uint16_t x, uint16_t y, uint32_t color);
+int (graph_set_pixel_alpha)(uint16_t x, uint16_t y, uint32_t color, uint8_t alpha);
+
+/// SCREEN
+int (graph_clear_screen)(void);
+
+/// DRAW
+int (graph_draw)(void);
+
+
+
+/// RECTANGLE
+
+
+int (graph_draw_hline)(uint16_t x, uint16_t y, uint16_t len, uint32_t color);
+int (graph_draw_rectangle)(uint16_t x, uint16_t y,uint16_t width, uint16_t height, uint32_t color);
+
+#endif /* end of include guard: GRAPH_H_INCLUDED */

Property changes on: proj/include/graph.h
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: proj/include/graph_macros.h
===================================================================
--- proj/include/graph_macros.h	(nonexistent)
+++ proj/include/graph_macros.h	(revision 176)
@@ -0,0 +1,32 @@
+#ifndef GRAPHICS_MACROS_H_INCLUDED
+#define GRAPHICS_MACROS_H_INCLUDED
+
+#define VC_BIOS_SERV  0x10 /** @brief Interrupt service of video card */
+#define VBE_CALL      0x4F /** @brief VBE call function specifier */
+
+#define MBYTE_BASE  0x0         /** @brief Base address (zero address) */
+#define MBYTE_SIZE  0xFFFFF     /** @brief Size of a mebibyte */
+
+// Graphics Functions
+#define VBE_CTRL_INFO       0x00    /** @brief Get VBE Controller Information */
+#define VBE_MD_INFO         0x01    /** @brief Get VBE Mode Information */
+#define SET_VBE_MD          0x02    /** @brief Set VBE Mode */
+
+// Error codes (AH)
+#define AH_SUCCESS          0x00    /** @brief Success code on BIOS call */
+#define AH_FUNC_CALL_FAIL   0x01    /** @brief Function call failed */
+#define AH_FUNC_NOT_SUPP    0x02    /** @brief Function call is not supported in current HW configuration */
+#define AH_FUNC_INVALID     0x03    /** @brief Invalid function in current video mode */
+
+// Graphics modes
+#define INDEXED_1024_768        0x105
+#define DIRECT_640_480          0x110
+#define DIRECT_800_600          0x115
+#define DIRECT_1280_1024_565    0x11A
+#define DIRECT_1280_1024_888    0x11B
+#define LINEAR_FRAME_BUFFER_MD  BIT(14)
+
+// Colors in RBG (8 bit)
+#define BLACK               0x000000
+
+#endif /* end of include guard: GRAPHICS_MACROS_H_INCLUDED */

Property changes on: proj/include/graph_macros.h
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: proj/include/i8254.h
===================================================================
--- proj/include/i8254.h	(nonexistent)
+++ proj/include/i8254.h	(revision 176)
@@ -0,0 +1,64 @@
+#ifndef _LCOM_I8254_H_
+#define _LCOM_I8254_H_
+
+#include <lcom/lcf.h>
+
+/** @defgroup i8254 i8254
+ *
+ * Constants for programming the i8254 Timer. Needs to be completed.
+ */
+
+#define TIMER_FREQ     1193182                                                          /**< @brief clock frequency for timer in PC and AT */
+#define TIMER_MIN_FREQ (TIMER_FREQ/UINT16_MAX) + ((TIMER_FREQ % UINT16_MAX) ? 1 : 0)    /**< @brief mininum frequency for timer */
+#define TIMER0_IRQ     0                                                                /**< @brief Timer 0 IRQ line */
+
+/* I/O port addresses */
+
+#define TIMER_0    0x40         /**< @brief Timer 0 count register */
+#define TIMER_1    0x41         /**< @brief Timer 1 count register */
+#define TIMER_2    0x42         /**< @brief Timer 2 count register */
+#define TIMER_CTRL 0x43         /**< @brief Control register */
+
+#define SPEAKER_CTRL 0x61       /**< @brief Register for speaker control  */
+
+/* Timer control */
+
+/* Timer selection: bits 7 and 6 */
+
+#define TIMER_SEL0   0x00              /**< @brief Control Word for Timer 0 */
+#define TIMER_SEL1   BIT(6)            /**< @brief Control Word for Timer 1 */
+#define TIMER_SEL2   BIT(7)            /**< @brief Control Word for Timer 2 */
+#define TIMER_RB_CMD (BIT(7) | BIT(6)) /**< @brief Read Back Command */
+
+/* Register selection: bits 5 and 4 */
+
+#define TIMER_LSB     BIT(4)                    /**< @brief Initialize Counter LSB only */
+#define TIMER_MSB     BIT(5)                    /**< @brief Initialize Counter MSB only */
+#define TIMER_LSB_MSB (TIMER_LSB | TIMER_MSB)   /**< @brief Initialize LSB first and MSB afterwards */
+#define TIMER_INMODE_MASK 0x30                  /**< @brief Mask for Timer Counter Mode */
+#define TIMER_INMODE_POS  4                     /**< @brief Bit position of Timer Counter Mode */
+
+/* Operating mode: bits 3, 2 and 1 */
+
+#define TIMER_SQR_WAVE (BIT(2) | BIT(1)) /**< @brief Mode 3: square wave generator */
+#define TIMER_RATE_GEN BIT(2)            /**< @brief Mode 2: rate generator */
+#define TIMER_MODE_MASK 0x0E             /**< @brief Mask for mode */
+#define TIMER_MODE_POS  1                /**< @brief Position of smallest bit from mode */
+#define TIMER_MODE_2ALT 0x6              /**< @brief Alternative notation for mode 2 */
+#define TIMER_MODE_3ALT 0x7              /**< @brief Alternative notation for mode 3 */
+#define TIMER_MODE_RED2 0x03             /**< @brief Reduce 3-bit mode to 2-bit mode */
+
+/* Counting mode: bit 0 */
+
+#define TIMER_BCD 0x01 /**< @brief Count in BCD */
+#define TIMER_BIN 0x00 /**< @brief Count in binary */
+
+/* READ-BACK COMMAND FORMAT */
+
+#define TIMER_RB_COUNT_  BIT(5)         /**< @brief Read counter value on read-back (0 to activate) */
+#define TIMER_RB_STATUS_ BIT(4)         /**< @brief Read status value on read-back (0 to activate) */
+#define TIMER_RB_SEL(n)  BIT((n) + 1)   /**< @brief Select timer to read information from */
+
+/**@}*/
+
+#endif /* _LCOM_I8254_H */

Property changes on: proj/include/i8254.h
___________________________________________________________________
Added: svn:executable
Index: proj/include/interrupts_func.h
===================================================================
--- proj/include/interrupts_func.h	(nonexistent)
+++ proj/include/interrupts_func.h	(revision 176)
@@ -0,0 +1,26 @@
+#ifndef INTERRUPTS_FUNC_H_INCLUDED
+#define INTERRUPTS_FUNC_H_INCLUDED
+
+#include <stdint.h>
+
+/**
+ * @brief Subscribes all drivers used (timer->keyboard->mouse)
+ * @return ERROR_CODE code representing the result of the operation, SUCCESS code is returned if everything is OK
+ * @see {_ERRORS_H_::errors}
+ */
+int (subscribe_all)(void);
+
+/**
+ * @brief Unsubscribes all subscribed interrupts
+ * @return ERROR_CODE code representing the result of the operation, SUCCESS code is returned if everything is OK
+ * @see {_ERRORS_H_::errors}
+ */
+int (unsubscribe_all)(void);
+
+/**
+ * @brief Calls interrupt handler corresponding to the bit specified by the argument.
+ * @param handler Interrupt handler to call
+ */
+void interrupt_handler(uint8_t handler);
+
+#endif /* end of include guard: INTERRUPTS_FUNC_H_INCLUDED */

Property changes on: proj/include/interrupts_func.h
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: proj/include/kbc.h
===================================================================
--- proj/include/kbc.h	(nonexistent)
+++ proj/include/kbc.h	(revision 176)
@@ -0,0 +1,55 @@
+/**
+ * This file concerns everything related to the KBC (KeyBoard Controller, which
+ * actually also manages the mouse)
+ */
+
+#ifndef KBC_H_INCLUDED
+#define KBC_H_INCLUDED
+
+/**
+ * @brief High-level function that reads the command byte of the KBC
+ * @param cmd Pointer to variable where command byte read from KBC will be stored
+ * @return 0 if operation was successful, 1 otherwise
+ */
+int (kbc_read_cmd)(uint8_t *cmd);
+
+/**
+ * @brief High-level function that changes the command byte of the KBC
+ * @param cmd New value for command byte of KBC
+ * @return 0 if operation was successful, 1 otherwise
+ */
+int (kbc_change_cmd)(uint8_t cmd);
+
+/**
+ * @brief High-level function that restores KBC to normal state
+ * High-level function that restores KBC to normal state, because lcf_start
+ * changes the command byte of KBC. If this function is not used, there is a
+ * chance that the keyboard and keyboard interrupts remain disabled.
+ * @return 0 if operation was successful, 1 otherwise
+ */
+int (kbc_restore_keyboard)();
+
+/**
+ * @brief Low-level function to issue a command to keyboard
+ * @param cmd command to be issued
+ * @return 0 if operation was successful, 1 otherwise
+ */
+int (kbc_issue_cmd)(uint8_t cmd);
+
+/**
+ * @brief Low-level function to issue an argument of a command
+ * @param cmd argument to be issued
+ * @return 0 if operation was successful, 1 otherwise
+ */
+int (kbc_issue_arg)(uint8_t arg);
+
+/**
+ * @brief Low-level function for reading byte from keyboard
+ * Low-level function for reading byte from keyboard. Waits until output buffer
+ * is full
+ * @param value Pointer to variable where byte read from keyboard will be stored
+ * @return 0 if operation was successful, 1 otherwise
+ */
+int (kbc_read_byte)(uint8_t *byte);
+
+#endif //KBC_H_INCLUDED

Property changes on: proj/include/kbc.h
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: proj/include/kbc_macros.h
===================================================================
--- proj/include/kbc_macros.h	(nonexistent)
+++ proj/include/kbc_macros.h	(revision 176)
@@ -0,0 +1,56 @@
+#ifndef KBC_MACROS_H_INCLUDED
+#define KBC_MACROS_H_INCLUDED
+
+/* KBC IRQ Line */
+
+#define KBC_IRQ     1   /* @brief KBC Controller IRQ Line */
+#define MOUSE_IRQ   12  /* @brief Mouse IRQ Line */
+
+/* Delay for KBC */
+#define DELAY           20000 /* @brief KBC Response Delay */
+#define KBC_NUM_TRIES   20    /* @brief Number of tries to issue command before timeout */
+
+/* I/O Ports Addresses */
+
+#define KBC_CMD     0x64 /* @brief Address to send commands to KBC */
+#define KBC_CMD_ARG 0x60 /* @brief Address to write KBC Command Arguments */
+#define STATUS_REG  0x64 /* @brief KBC Status Register address */
+
+#define OUTPUT_BUF  0x60 /* @brief Address of Output Buffer of KBC */
+
+/* KBC Commands */
+#define READ_KBC_CMD    0x20 /* @brief Read KBC Command Byte */
+#define WRITE_KBC_CMD   0x60 /* @brief Write KBC Command Byte */
+#define KBC_SELF_TEST   0xAA /* @brief KBC Diagnostic Tests */
+#define KBC_INT_TEST    0xAB /* @brief Tests Keyboard Clock and Data lines */
+#define KBC_INT_DISABLE 0xAD /* @brief Disable KBC Interface */
+#define KBC_INT_ENABLE  0xAE /* @brief Enable KBC Interface */
+#define MOUSE_DISABLE   0xA7 /* @brief Disable Mouse */
+#define MOUSE_ENABLE    0xA8 /* @brief Enable Mouse */
+#define MOUSE_INT_TEST  0xA9 /* @brief Tests Mouse data line */
+#define MOUSE_WRITE_B   0xD4 /* @brief Write a byte directly to the mouse */
+
+/* Status Byte Masking */
+
+#define OUT_BUF_FUL     BIT(0) /* @brief Output Buffer State */
+#define IN_BUF_FULL     BIT(1) /* @brief Input Buffer State */
+#define SYS_FLAG        BIT(2) /* @brief System Flag */
+#define DATA_CMD_WRITE  BIT(3) /* @brief Identifier of type of byte in input buffer */
+#define INH_FLAG        BIT(4) /* @brief Keyboard inihibited */
+#define AUX_MOUSE       BIT(5) /* @brief Mouse Data */
+#define TIME_OUT_REC    BIT(6) /* @brief Time Out Error - Invalid Data */
+#define PARITY_ERROR    BIT(7) /* @brief Parity Error - Invalid Data */
+
+/* Scancode Constants */
+
+#define ESC_BREAK_CODE  0x81    /* @brief ESC Break Code */
+#define TWO_BYTE_CODE   0xE0    /* @brief First byte of a two byte Scancode */
+#define BREAK_CODE_BIT  BIT(7)  /* @brief Bit to distinguish between Make code and Break code */
+
+/* Command byte masks */
+#define INT_KBD         BIT(0)  /* @brief Enable Keyboard Interrupts */
+#define INT_MOU         BIT(1)  /* @brief Enable Mouse Interrupts */
+#define DIS_KBD         BIT(4)  /* @brief Disable Keyboard */
+#define DIS_MOU         BIT(5)  /* @brief Disable Mouse */
+
+#endif //KBC_MACROS_H_INCLUDED

Property changes on: proj/include/kbc_macros.h
___________________________________________________________________
Added: svn:executable
Index: proj/include/keyboard.h
===================================================================
--- proj/include/keyboard.h	(nonexistent)
+++ proj/include/keyboard.h	(revision 176)
@@ -0,0 +1,26 @@
+/**
+ * This file concerns everything related to the keyboard
+ */
+
+#ifndef KEYBOARD_H_INCLUDED
+#define KEYBOARD_H_INCLUDED
+
+/**
+ * @brief Subscribes Keyboard Interrupts and disables Minix Default IH
+ * @param interrupt_bit Bit of Interrupt Vector that will be set when Keyboard Interrupt is pending
+ * @param interrupt_id Keyboard Interrupt ID to specify the Keyboard Interrupt in other calls
+ * @return ERROR_CODE code representing the result of the operation, SUCCESS code is returned if everything is OK
+ * @see {_ERRORS_H_::errors}
+ */
+int (subscribe_kbc_interrupt)(uint8_t interrupt_bit, int *interrupt_id);
+
+uint8_t scancode[2];
+int done;
+int sz;
+int got_error_keyboard;
+
+void (kbc_ih)(void);
+
+int (keyboard_poll)(uint8_t bytes[], uint8_t *size);
+
+#endif //KEYBOARD_H_INCLUDED

Property changes on: proj/include/keyboard.h
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: proj/include/mouse.h
===================================================================
--- proj/include/mouse.h	(nonexistent)
+++ proj/include/mouse.h	(revision 176)
@@ -0,0 +1,91 @@
+#ifndef MOUSE_H_INCLUDED
+#define MOUSE_H_INCLUDED
+
+#include <stdint.h>
+
+/**
+ * @brief Subscribes Mouse Interrupts and disables Minix Default IH
+ * @param interrupt_bit Bit of Interrupt Vector that will be set when Mouse Interrupt is pending
+ * @param interrupt_id Mouse Interrupt ID to specify the Mouse Interrupt in other calls
+ * @return ERROR_CODE code representing the result of the operation, SUCCESS code is returned if everything is OK
+ * @see {_ERRORS_H_::errors}
+ */
+int (subscribe_mouse_interrupt)(uint8_t interrupt_bit, int *interrupt_id);
+
+//These have to do with mouse_ih
+int got_error_mouse_ih;
+uint8_t packet_mouse_ih[3];
+int counter_mouse_ih;
+
+/**
+ * @brief   Parse 3 bytes and returns it as a parsed, struct packet.
+ * @param   packet_bytes    array of bytes to parse
+ * @return  parsed struct packet
+ */
+struct packet (mouse_parse_packet)(const uint8_t *packet_bytes);
+
+/**
+ * @brief Polls mouse for data. Blocks execution until a valid mouse packet is obtained.
+ * @param   pp      pointer to packet struct in which the result will be stored
+ * @param   period  time (in milliseconds) the poller should wait between pollings of bytes
+ * @return ERROR_CODE code representing the result of the operation, SUCCESS code is returned if everything is OK
+ */
+int mouse_poll(struct packet *pp, uint16_t period);
+
+/**
+ * @brief Sets data report mode for mouse
+ * @param   on  zero to disable data report, any other value to enable data report
+ * @return  ERROR_CODE code representing the result of the operation, SUCCESS code is returned if everything is OK
+ */
+int (mouse_set_data_report)(int on);
+
+/**
+ * @brief Reads data byte from mouse
+ * <summary>
+ * Polls the mouse till data is available for reading
+ * </summary>
+ * @param data Pointer to variable where byte read from mouse will be stored
+ * @return ERROR_CODE code representing the result of the operation, SUCCESS code is returned if everything is OK
+ * @see {_ERRORS_H_::errors}
+ */
+int (mouse_read_data)(uint8_t *data, uint16_t period);
+
+/**
+ * @brief Issues command to mouse
+ * <summary>
+ * Issues command to mouse, returns error after two consecutive errors reported by the acknowledgment byte
+ * </summary>
+ * @param cmd Command to be issued
+ * @return ERROR_CODE code representing the result of the operation, SUCCESS code is returned if everything is OK
+ * @see {_ERRORS_H_::errors}
+ */
+int (mouse_issue_cmd)(uint32_t cmd);
+
+/**
+ * @brief Reads byte from mouse
+ * <summary>
+ * Reads byte from mouse, giving error if exceeds number of tries to read
+ * </summary>
+ * @param byte Pointer to variable where byte read from mouse will be stored
+ * @return ERROR_CODE code representing the result of the operation, SUCCESS code is returned if everything is OK
+ * @see {_ERRORS_H_::errors}
+ */
+int (mouse_read_byte)(uint8_t *byte);
+
+/**
+ * @brief Polls OUT_BUF for byte coming from mouse.
+ * @param   byte    pointer to byte read from OUT_BUF
+ * @param   period  time (in milliseconds) the poller should wait between pollings of bytes
+ * @return ERROR_CODE code representing the result of the operation, SUCCESS code is returned if everything is OK
+ */
+int (mouse_poll_byte)(uint8_t *byte, uint16_t period);
+
+/**
+ * @brief Converts 9-bit number to 16-bit with sign extension
+ * @param sign_bit  Sign bit identifiying the signal of the number
+ * @param byte      Least significant byte that will be extended
+ * @return Extended 9-bit number
+ */
+int16_t (sign_extend_byte)(uint8_t sign_bit, uint8_t byte);
+
+#endif //MOUSE_H_INCLUDED

Property changes on: proj/include/mouse.h
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: proj/include/mouse_macros.h
===================================================================
--- proj/include/mouse_macros.h	(nonexistent)
+++ proj/include/mouse_macros.h	(revision 176)
@@ -0,0 +1,37 @@
+#ifndef MOUSE_MACROS_H_INCLUDED
+#define MOUSE_MACROS_H_INCLUDED
+
+/* Mouse Data Packet */
+// Byte 0 - Button States
+#define LEFT_BUTTON     BIT(0) /* @brief Left button click event*/
+#define RIGHT_BUTTON    BIT(1) /* @brief Right button click event */
+#define MIDDLE_BUTTON   BIT(2) /* @brief Middle button click event */
+#define FIRST_BYTE_ID   BIT(3) /* @brief Identifier of first byte of packet CAREFUL: Not 100% accurate */
+#define MSB_X_DELTA     BIT(4) /* @brief Most significant bit of X delta */
+#define MSB_Y_DELTA     BIT(5) /* @brief Most significant bit of Y delta */
+#define X_OVERFLOW      BIT(6) /* @brief X delta overflowed */
+#define Y_OVERFLOW      BIT(7) /* @brief Y delta overflowed */
+// Byte 1 - X delta
+// Byte 2 - Y delta
+
+/* Mouse Commands */
+#define RESET           0xFF /* @brief Reset mouse */
+#define RESEND          0xFE /* @brief Resend command */
+#define DEFAULT         0xF6 /* @brief Set default values */
+#define DIS_DATA_REP    0xF5 /* @brief Disable Data Reporting */
+#define ENABLE_DATA_REP 0xF4 /* @brief Enable Data Reporting */
+#define SET_SAMPLE_RT   0xF3 /* @brief Sets state sampling rate */
+#define SET_REMOTE_MD   0xF0 /* @brief Sets Mouse on Remote Mode, data on request */
+#define READ_DATA       0xEB /* @brief Sends data packet request */
+#define SET_STREAM_MD   0xEA /* @brief Sets mouse on Stream Mode, data on events */
+#define STATUS_REQUEST  0xE9 /* @brief Get mouse configuration */
+#define SET_RESOLUTION  0xE8 /* @brief Sets resolution for mouse movement */
+#define SCALING_ACC_MD  0xE7 /* @brief Sets scaling on acceleration mode */
+#define SCALING_LIN_MD  0xE6 /* @brief Sets scaling on linear mode */
+
+/* Mouse Controller Responses */
+#define ACK_OK      0xFA /* @brief Operation sucessful */
+#define ACK_INVALID 0xFE /* @brief Invalid Byte, first occurence */
+#define ACK_ERROR   0xFC /* @brief Invalid Byte on resend */
+
+#endif // MOUSE_MACROS_H_INCLUDED

Property changes on: proj/include/mouse_macros.h
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: proj/include/proj_func.h
===================================================================
--- proj/include/proj_func.h	(nonexistent)
+++ proj/include/proj_func.h	(revision 176)
@@ -0,0 +1,45 @@
+#ifndef PROJ_FUNC_H_INCLUDED
+#define PROJ_FUNC_H_INCLUDED
+
+#include "sprite.h"
+
+/**
+ * @brief Cleans up all memory, unsubscribes interrupts.
+ * @return ERROR_CODE code representing the result of the operation, SUCCESS code is returned if everything is OK
+ * @see {_ERRORS_H_::errors}
+ */
+int cleanup(void);
+
+/**
+ * @brief Updates movement variables.
+ */
+void update_movement(void);
+
+void update_mouse_position(struct packet *p);
+
+int32_t get_mouse_X(void);
+
+int32_t get_mouse_Y(void);
+
+/**
+ * @brief
+ * @param
+ * @param
+ * @param
+ * @return Angle
+ */
+double get_mouse_angle(sprite_t *p);
+
+/**
+ * @brief Get horizontal movement direction.
+ * @return Horizontal movement direction (-1 -> heading LEFT; 0 -> not moving horizontally; 1 -> heading RIGHT)
+ */
+int get_hor_movement(void);
+
+/**
+ * @brief Get vertical movement direction.
+ * @return Vertical movement direction (-1 -> heading UP; 0 -> not moving vertically; 1 -> heading DOWN)
+ */
+int get_ver_movement(void);
+
+#endif /* end of include guard: PROJ_FUNC_H_INCLUDED */

Property changes on: proj/include/proj_func.h
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: proj/include/proj_macros.h
===================================================================
--- proj/include/proj_macros.h	(nonexistent)
+++ proj/include/proj_macros.h	(revision 176)
@@ -0,0 +1,31 @@
+#ifndef PROJ_MACROS_H_INCLUDED
+#define PROJ_MACROS_H_INCLUDED
+
+// WASD Movement Keys
+#define W_MAKE_CODE     0x11    /** @brief W Make Code */
+#define W_BREAK_CODE    0x91    /** @brief W Break Code */
+#define A_MAKE_CODE     0x1E    /** @brief A Make Code */
+#define A_BREAK_CODE    0x9E    /** @brief A Break Code */
+#define S_MAKE_CODE     0x1F    /** @brief S Make Code */
+#define S_BREAK_CODE    0x9F    /** @brief S Break Code */
+#define D_MAKE_CODE     0x20    /** @brief D Make Code */
+#define D_BREAK_CODE    0xA0    /** @brief D Break Code */
+
+// Movement Directions
+#define UP      -1  /** @brief Moving to the top side of screen */
+#define DOWN    1   /** @brief Moving to the bottom side of screen */
+#define LEFT    -1  /** @brief Moving to the left side of screen */
+#define RIGHT   1   /** @brief Moving to the right side of screen */
+#define REST    0   /** @brief Not moving */
+
+// Extra Keys
+#define ESC_MAKE_CODE   0x01    /** @brief ESC Make Code */
+#define ESC_BREAK_CODE  0x81    /** @brief ESC Break Code */
+
+// Refresh Rate
+#define REFRESH_RATE    60      /** @brief Screen refresh rate */
+
+//Graphics mode
+#define GRAPH_MODE      DIRECT_1280_1024_888 /** @brief Graphic mode used */
+
+#endif /* end of include guard: PROJ_MACROS_H_INCLUDED */

Property changes on: proj/include/proj_macros.h
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: proj/include/sprite.h
===================================================================
--- proj/include/sprite.h	(nonexistent)
+++ proj/include/sprite.h	(revision 176)
@@ -0,0 +1,23 @@
+#ifndef SPRITE_H_INCLUDED
+#define SPRITE_H_INCLUDED
+
+struct sprite;
+typedef struct sprite sprite_t;
+
+sprite_t* (sprite_ctor)(const char **xpm, int u0, int v0);
+void      (sprite_dtor)(sprite_t *p);
+
+void (sprite_set_x)     (sprite_t *p, int16_t x);
+void (sprite_set_y)     (sprite_t *p, int16_t y);
+void (sprite_set_pos)   (sprite_t *p, int16_t x, int16_t y);
+void (sprite_set_angle) (sprite_t *p, double angle);
+void (sprite_set_center)(sprite_t *p, int16_t u0, int16_t v0);
+
+int sprite_get_x(const sprite_t *p);
+int sprite_get_y(const sprite_t *p);
+int sprite_get_w(const sprite_t *p);
+int sprite_get_h(const sprite_t *p);
+
+void (sprite_draw)(const sprite_t *p);
+
+#endif //SPRITE_H_INCLUDED

Property changes on: proj/include/sprite.h
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: proj/include/timer.h
===================================================================
--- proj/include/timer.h	(nonexistent)
+++ proj/include/timer.h	(revision 176)
@@ -0,0 +1,14 @@
+/**
+ * This file concerns everything related to the timer
+ */
+
+#ifndef TIMER_H_INCLUDED
+#define TIMER_H_INCLUDED
+
+#include <stdint.h>
+
+int (subscribe_timer_interrupt)(uint8_t interrupt_bit, int *interrupt_id);
+
+uint32_t no_interrupts;
+
+#endif //TIMER_H_INCLUDED

Property changes on: proj/include/timer.h
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: proj/include/utils.h
===================================================================
--- proj/include/utils.h	(nonexistent)
+++ proj/include/utils.h	(revision 176)
@@ -0,0 +1,53 @@
+#ifndef UTILS_H_INCLUDED
+#define UTILS_H_INCLUDED
+
+/**
+ * @brief Gets the least significant byte of a 16-bit variable
+ * @param val 16-bit variable
+ * @param lsb Pointer to a 8-bit variable to store the value of the LSB
+ * @return ERROR_CODE code representing the result of the operation, SUCCESS code is returned if everything is OK
+ */
+int(util_get_LSB)(uint16_t val, uint8_t *lsb);
+
+/**
+ * @brief Gets the most significant byte of a 16-bit variable
+ * @param val 16-bit variable
+ * @param lsb Pointer to a 8-bit variable to store the value of the MSB
+ * @return ERROR_CODE code representing the result of the operation, SUCCESS code is returned if everything is OK
+ */
+int(util_get_MSB)(uint16_t val, uint8_t *msb);
+
+/**
+ * @brief sys_inb wrapper
+ * @param port Port to read from
+ * @param value Pointer to byte to store value read
+ * @return ERROR_CODE code representing the result of the operation, SUCCESS code is returned if everything is OK
+ */
+int (util_sys_inb)(int port, uint8_t *value);
+
+/**
+ * @brief Unsubcribes Interrupts
+ * @param interrupt_id Interrupt ID, value via arguments on subscription of the interrupt_id
+ * @see subscribe_kbc_interrupt, subscribe_timer_interrupt
+ * @return ERROR_CODE code representing the result of the operation, SUCCESS code is returned if everything is OK
+ */
+int (unsubscribe_interrupt)(int *interrupt_id);
+
+/**
+ * @brief Gets the minimum value out of two values.
+ * @param a     First value
+ * @param b     Second value
+ * @return  The minimum of the two values
+ */
+int32_t min(int32_t a, int32_t b);
+
+/**
+ * @brief Gets the maximum value out of two values.
+ * @param a     First value
+ * @param b     Second value
+ * @return  The maximum of the two values
+ */
+int32_t max(int32_t a, int32_t b);
+
+
+#endif //UTILS_H_INCLUDED

Property changes on: proj/include/utils.h
___________________________________________________________________
Added: svn:executable
