Espresso 0.0.2a
This commit is contained in:
@ -4,13 +4,22 @@
|
||||
|
||||
#include <kernel/vars.h>
|
||||
|
||||
/*
|
||||
Number of bytes in kernel variable space: 4096 (4KiB)
|
||||
Number of bits in kernel variable space: 32768 (32Mib)
|
||||
*/
|
||||
|
||||
static uint8_t* vars_start = NULL;
|
||||
|
||||
static int num_bytes_used = 0;
|
||||
uint8_t vars[KERNEL_VARIABLES_SIZE];
|
||||
|
||||
void init_vars(void)
|
||||
{
|
||||
vars_start = (uint8_t*) malloc(8 * 1024); /* 1 KiB */
|
||||
memclr(vars_start, (size_t) 1024);
|
||||
memset(vars, 0, KERNEL_VARIABLES_SIZE);
|
||||
}
|
||||
|
||||
/* bo = bit offset */
|
||||
void set_bit_bo(uint32_t offset, uint8_t val)
|
||||
{
|
||||
/* First, extract the byte offset. (round down to a multiple of 8, and divide by 8. */
|
||||
(void) offset;
|
||||
(void) val;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user