mirror of
https://github.com/ringtailsoftware/uvm32.git
synced 2026-06-05 22:43:39 +00:00
Default behaviour is to run to end of main
This commit is contained in:
parent
7b7b08e626
commit
3cdc9ae0ca
7 changed files with 12 additions and 19 deletions
|
|
@ -1,4 +1,3 @@
|
||||||
#define USE_MAIN
|
|
||||||
#include "uvm32_target.h"
|
#include "uvm32_target.h"
|
||||||
|
|
||||||
void main(void) {
|
void main(void) {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
#define USE_MAIN
|
|
||||||
#include "uvm32_target.h"
|
#include "uvm32_target.h"
|
||||||
|
|
||||||
void write(int n) {
|
void write(int n) {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
#define USE_MAIN
|
|
||||||
#include "uvm32_target.h"
|
#include "uvm32_target.h"
|
||||||
|
|
||||||
void main(void) {
|
void main(void) {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
#define USE_MAIN
|
|
||||||
#include "uvm32_target.h"
|
#include "uvm32_target.h"
|
||||||
|
|
||||||
// https://github.com/shastro/CodeGolf-Lissajous/blob/master/lissa.c
|
// https://github.com/shastro/CodeGolf-Lissajous/blob/master/lissa.c
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,4 @@
|
||||||
#define USE_MAIN
|
|
||||||
#include "uvm32_target.h"
|
#include "uvm32_target.h"
|
||||||
|
|
||||||
#include "uvm32.h"
|
#include "uvm32.h"
|
||||||
#include "../common/uvm32_common_custom.h"
|
#include "../common/uvm32_common_custom.h"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,10 @@
|
||||||
#include "uvm32_target.h"
|
#include "uvm32_target.h"
|
||||||
|
|
||||||
|
// provide main, with setup()/loop() flow
|
||||||
|
void setup(void);
|
||||||
|
bool loop(void);
|
||||||
|
|
||||||
|
|
||||||
uint32_t count;
|
uint32_t count;
|
||||||
|
|
||||||
bool loop(void) {
|
bool loop(void) {
|
||||||
|
|
@ -16,3 +21,10 @@ void setup(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void main(void) {
|
||||||
|
setup();
|
||||||
|
while(loop()) {
|
||||||
|
yield();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -59,16 +59,3 @@ static uint32_t syscall(uint32_t id, uint32_t param) {
|
||||||
|
|
||||||
#include "uvm32_common_custom.h"
|
#include "uvm32_common_custom.h"
|
||||||
|
|
||||||
// provide main, with setup()/loop() flow
|
|
||||||
void setup(void);
|
|
||||||
bool loop(void);
|
|
||||||
|
|
||||||
#ifndef USE_MAIN
|
|
||||||
void main(void) {
|
|
||||||
setup();
|
|
||||||
while(loop()) {
|
|
||||||
yield();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue