Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
fortuna-mines
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
be1g19
fortuna-mines
Commits
54cbd34e
Commit
54cbd34e
authored
4 years ago
by
Bradley Eaton
Browse files
Options
Downloads
Patches
Plain Diff
Moved fortuna os things into mines.c and mines.h
parent
1a570758
No related branches found
No related tags found
No related merge requests found
Pipeline
#7425
passed
4 years ago
Stage: build
Changes
5
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
OS.h
+0
-6
0 additions, 6 deletions
OS.h
mines.c
+8
-27
8 additions, 27 deletions
mines.c
mines.h
+9
-0
9 additions, 0 deletions
mines.h
os.c
+0
-24
0 additions, 24 deletions
os.c
os.h
+0
-39
0 additions, 39 deletions
os.h
with
17 additions
and
96 deletions
OS.h
deleted
100644 → 0
+
0
−
6
View file @
1a570758
#ifndef OS_H_
#define OS_H_
#endif // OS_H_
This diff is collapsed.
Click to expand it.
mines.c
+
8
−
27
View file @
54cbd34e
/* COMP2215 Task 5---SKELETON */
#include
"os.h"
/* Loosly Based on COMP2215 Task 5---SKELETON */
#include
"mines.h"
#include
<stdlib.h>
#include
<avr/eeprom.h>
int
blink
(
int
);
...
...
@@ -467,7 +463,13 @@ void empty(void){
void
main
(
void
)
{
os_init
();
/* 8MHz clock, no prescaling (DS, p. 48) */
CLKPR
=
(
1
<<
CLKPCE
);
CLKPR
=
0
;
init_lcd
();
os_init_scheduler
();
os_init_ruota
();
// os_add_task( blink, 25, 1);
os_add_task
(
collect_delta
,
200
,
1
);
...
...
@@ -618,27 +620,6 @@ int check_switches(int state) {
sweep_adjacent
(
position
);
}
// if (get_switch_rpt(_BV(SWN))) {
// display_string("[R] North\n");
// }
//
// if (get_switch_rpt(_BV(SWE))) {
// display_string("[R] East\n");
// }
//
// if (get_switch_rpt(_BV(SWS))) {
// display_string("[R] South\n");
// }
//
// if (get_switch_rpt(_BV(SWW))) {
// display_string("[R] West\n");
// }
//
// if (get_switch_rpt(SWN)) {
// display_string("[R] North\n");
// }
return
state
;
}
...
...
This diff is collapsed.
Click to expand it.
mines.h
+
9
−
0
View file @
54cbd34e
#include
<stdio.h>
#include
<stdlib.h>
#include
<avr/io.h>
#include
<avr/interrupt.h>
#include
<avr/eeprom.h>
#include
"lcd.h"
#include
"rios.h"
#include
"ruota.h"
#ifndef MINES_H_
#define MINES_H_
...
...
This diff is collapsed.
Click to expand it.
os.c
deleted
100644 → 0
+
0
−
24
View file @
1a570758
/* _____ _ ___ ____
* | ___|__ _ __| |_ _ _ _ __ __ _ / _ \/ ___|
* | |_ / _ \| '__| __| | | | '_ \ / _` | | | \___ \
* | _| (_) | | | |_| |_| | | | | (_| | |_| |___) |
* |_| \___/|_| \__|\__,_|_| |_|\__,_|\___/|____/
*
*/
#include
"os.h"
#include
"rios.h"
#include
"ruota.h"
void
os_init
(
void
)
{
/* 8MHz clock, no prescaling (DS, p. 48) */
CLKPR
=
(
1
<<
CLKPCE
);
CLKPR
=
0
;
// DDRB |= _BV(PB7); /* LED as output */
init_lcd
();
os_init_scheduler
();
os_init_ruota
();
}
This diff is collapsed.
Click to expand it.
os.h
deleted
100644 → 0
+
0
−
39
View file @
1a570758
/* FortunaOS
_____ _ ___ ____
| ___|___ _ __ | |_ _ _ _ __ __ _ / _ \ / ___|
| |_ / _ \ | '__|| __|| | | || '_ \ / _` || | | |\___ \
| _|| (_) || | | |_ | |_| || | | || (_| || |_| | ___) |
|_| \___/ |_| \__| \__,_||_| |_| \__,_| \___/ |____/
Minimalist Operating System for LaFortuna board, build on:
- The RIOS Scheduler
- Peter Dannegger’s Code for the Rotary Encoder
- Peter Dannegger’s Code for Switch debouncing
- Steve Gunn’s display driver
- ChanN’s FAT File System
Occupies Timer T0 for scheduling and LED brightness.
*/
#ifndef OS_H
#define OS_H
#include
<stdio.h>
#include
<avr/io.h>
#include
<avr/interrupt.h>
#include
"lcd.h"
#include
"rios.h"
#include
"ruota.h"
#define LED_ON PORTB |= _BV(PINB7)
#define LED_OFF PORTB &= ~_BV(PINB7)
#define LED_TOGGLE PINB |= _BV(PINB7)
void
os_init
(
void
);
#endif
/* OS_H */
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment