Draft: lab 5 failed

This commit is contained in:
2025-05-03 20:45:34 +08:00
parent 981cae803b
commit e73f90395d
39 changed files with 588 additions and 429 deletions

View File

@@ -35,7 +35,7 @@ int ringbuffer_push(ringbuffer_t *buf, uint8_t val)
uint8_t ringbuffer_bump(ringbuffer_t *buf)
{
if (buf->size == 0)
exit(ERR_INVALID_OP);
panic(ERR_INVALID_OP);
uint8_t ret = *buf->read++;
@@ -49,7 +49,7 @@ uint8_t ringbuffer_bump(ringbuffer_t *buf)
uint8_t ringbuffer_peek(ringbuffer_t *buf)
{
if (buf->size == 0)
exit(ERR_INVALID_OP);
panic(ERR_INVALID_OP);
return *buf->read;
}