2015-06-28 08:10:45 +08:00
|
|
|
// This is free and unencumbered software released into the public domain.
|
2015-07-02 16:49:35 +08:00
|
|
|
//
|
2015-06-28 08:10:45 +08:00
|
|
|
// Anyone is free to copy, modify, publish, use, compile, sell, or
|
|
|
|
// distribute this software, either in source code form or as a compiled
|
|
|
|
// binary, for any purpose, commercial or non-commercial, and by any
|
|
|
|
// means.
|
|
|
|
|
2015-06-27 04:02:22 +08:00
|
|
|
#ifndef FIRMWARE_H
|
|
|
|
#define FIRMWARE_H
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdbool.h>
|
|
|
|
|
|
|
|
// print.c
|
|
|
|
void print_chr(char ch);
|
|
|
|
void print_str(const char *p);
|
2015-07-02 16:46:21 +08:00
|
|
|
void print_dec(unsigned int val);
|
2015-11-19 21:01:16 +08:00
|
|
|
void print_hex(unsigned int val, int digits);
|
2015-06-27 04:02:22 +08:00
|
|
|
|
2019-09-12 16:48:14 +08:00
|
|
|
// hello.c
|
|
|
|
void hello(void);
|
|
|
|
|
2015-06-27 04:02:22 +08:00
|
|
|
// sieve.c
|
2015-07-04 17:47:19 +08:00
|
|
|
void sieve(void);
|
2015-06-27 04:02:22 +08:00
|
|
|
|
2015-06-27 05:14:38 +08:00
|
|
|
// multest.c
|
|
|
|
uint32_t hard_mul(uint32_t a, uint32_t b);
|
|
|
|
uint32_t hard_mulh(uint32_t a, uint32_t b);
|
|
|
|
uint32_t hard_mulhsu(uint32_t a, uint32_t b);
|
|
|
|
uint32_t hard_mulhu(uint32_t a, uint32_t b);
|
2019-09-12 16:48:14 +08:00
|
|
|
uint32_t hard_div(uint32_t a, uint32_t b);
|
|
|
|
uint32_t hard_divu(uint32_t a, uint32_t b);
|
|
|
|
uint32_t hard_rem(uint32_t a, uint32_t b);
|
|
|
|
uint32_t hard_remu(uint32_t a, uint32_t b);
|
2015-07-04 17:47:19 +08:00
|
|
|
void multest(void);
|
2015-06-27 05:14:38 +08:00
|
|
|
|
2015-06-27 04:02:22 +08:00
|
|
|
// stats.c
|
2015-07-04 17:47:19 +08:00
|
|
|
void stats(void);
|
2015-06-27 04:02:22 +08:00
|
|
|
|
|
|
|
#endif
|