Felix Kopp
dbda35d82a
serial: prepare for I/O thread integration
2020-11-29 23:22:44 +01:00
Felix Kopp
2a899210c6
sched: add IOWAIT process state
2020-11-29 22:02:09 +01:00
Felix Kopp
55ee84b99b
sched: rework irq pend requests
2020-11-29 22:01:35 +01:00
Felix Kopp
523f6f4bb2
serial: forgot to commit some shit
2020-11-29 20:38:16 +01:00
Felix Kopp
43add13fea
serial: make ringbuf write operations atomic
2020-11-29 20:34:57 +01:00
Felix Kopp
a25ab04b0d
sched: implement process initialization
2020-11-29 20:33:18 +01:00
Felix Kopp
f49a6643d7
sched: major refactor
2020-11-29 20:23:27 +01:00
Felix Kopp
f4e321932f
serial: switch to DMA buffers
2020-11-29 20:19:52 +01:00
Felix Kopp
2ce25193fd
Get rid of unnecessary if branch
...
Branching is slow compared to ALU operations and stuff, you know
2020-11-28 04:20:39 +01:00
Felix Kopp
fe87a65ded
Add check for TXRDY mask
2020-11-28 03:34:30 +01:00
Felix Kopp
e2c2d84744
Implement %i and %u
2020-11-28 03:32:52 +01:00
Felix Kopp
38046b25e5
Add errno constants
2020-11-28 03:32:31 +01:00
Felix Kopp
113ca47809
Implement rudimentary printk
2020-11-27 00:13:56 +01:00
Felix Kopp
7493c7a5ae
SERIAL FINALLY FUCKING WORKS OMG
2020-11-26 19:20:06 +01:00
Felix Kopp
ba9565a1b4
Clean up and get rid of some unnecessary stuff
2020-11-26 19:19:04 +01:00
Felix Kopp
cbd396e179
I want to fucking die
...
So this is why it didn't fire the right interrupt.
2020-11-25 18:49:50 +01:00
Felix Kopp
7997d6ca07
The amount of bs code I write is fascinating
2020-11-24 23:46:33 +01:00
Felix Kopp
056c318e86
Make memcmp more compiler friendly
...
The Thumb ISA allows incrementing a pointer right after dereferencing
it. This commit attempts to make it more obvious to the compiler to use
this instruction in memcmp().
2020-11-19 16:33:40 +01:00
Felix Kopp
ed60b267a0
Finish serial init code
...
The first major hurdle has been overcome, though several more are
still awaiting me. Next up is IRQ handling.
2020-11-19 01:44:51 +01:00
Felix Kopp
1eeaf1dc28
Add PIO register definitions
...
Looks like I forgot those.
2020-11-18 03:47:04 +01:00
Felix Kopp
6a141b914b
Add register definitions for UART
...
This is the first of a series of commits to get a
hardware serial console up and running on the
Arduino Due. When I have that, I can actually
do some real debugging.
2020-11-18 02:26:16 +01:00
Felix Kopp
2df4efdf2a
Implement core serial routines
...
This is just a rough baseline for the higher-level
serial handling code and will probably change
within the next couple of commits.
2020-11-14 04:04:59 +01:00
Felix Kopp
0c24e3fde8
Fix typos and possible typecast bugs
2020-11-14 04:01:50 +01:00
Felix Kopp
2778fad339
Get rid of unnecessary loop counter
...
Incrementing counters in those loops are redundant
as we are keeping track of the ptr offsets anyways
2020-11-11 19:53:08 +01:00
Felix Kopp
1fa5d159a7
Simplify ringbuf indexing
...
This whole pointer arithmetic things might be all
fancy and stuff, but the diff should make it clear
that it is just unnecessarily complicated.
2020-10-30 18:07:29 +01:00
Felix Kopp
c031bf8611
Add ringbuf_size API
...
This might become useful if we want to dynamically
allocate an array that stores the entire queue.
2020-10-30 17:51:19 +01:00
Felix Kopp
fd75357944
Add list empty check in malloc
2020-10-24 17:44:18 +02:00
Felix Kopp
d37e139ddd
Bugfix for list_init macro
2020-10-14 17:56:43 +02:00
Felix Kopp
ef2142c551
Create serial interface definitions
2020-10-14 17:56:11 +02:00
Felix Kopp
32afd10e99
Minor macro refactor
2020-10-14 11:47:42 +00:00
Felix Kopp
fd4f87d595
(fuck)
2020-10-14 11:32:43 +00:00
Felix Kopp
5b41a9d87a
Make malloc actually use the correct region
2020-10-14 11:30:09 +00:00
Felix Kopp
745623afb2
I am stoopid (and fixed some bugs)
2020-10-14 11:29:02 +00:00
Felix Kopp
0ded77495b
Add ring buffer implementation
...
The next big step is to implement some sort of serial console in order
to get some debug output on real hardware (unfortunately, I don't have
a hardware debugger).
2020-10-12 19:07:03 +02:00
Felix Kopp
bdf3f008d7
Final refactor, initialize allocator on init
2020-10-12 17:54:07 +02:00
Felix Kopp
fc75cb2014
Refactor and make the allocator work
2020-10-12 15:35:10 +02:00
Felix Kopp
cd833dbbdf
Disallow double-freeing the same pointer
2020-10-12 12:47:20 +02:00
Felix Kopp
608cebb4a4
Fix another pile of stupid bugs
2020-10-12 12:45:13 +02:00
Felix Kopp
3929b55e85
Fix list iteration bug
2020-10-12 11:24:48 +02:00
Felix Kopp
0cfc979109
Fix operator precedence bug
2020-10-12 01:20:16 +02:00
Felix Kopp
0e725b795d
Move license comment to the bottom
2020-10-11 19:35:30 +02:00
Felix Kopp
9dfce93c57
Add memory allocator implementation
2020-10-11 19:08:20 +02:00
Felix Kopp
1541bf8bbb
Remove dup definition
2020-10-11 19:07:53 +02:00
Felix Kopp
3ed7e95c17
Add circular linked list implementation
2020-10-11 19:07:36 +02:00
Felix Kopp
a8574dc17a
Rename to IRQ
2020-10-10 23:15:47 +02:00
Felix Kopp
a4e244e7fc
Fix some minor errors
2020-10-10 23:11:21 +02:00
Felix Kopp
959b36215e
Cleanup 3
2020-06-17 20:42:41 +02:00
Felix Kopp
007434eb27
Fix vscode profile
2020-06-17 20:40:48 +02:00
Felix Kopp
424f5a902f
Cleanup 2
2020-06-17 20:40:22 +02:00
Felix Kopp
7a6c34b14e
Implement ctype.h
2020-06-14 10:43:06 +02:00