1
0
mirror of https://github.com/meekrosoft/fff synced 2026-01-23 00:15:59 +01:00

Migrate build to CMake and standard github workflows

Replace makefiles with CMakeLists.txt. This will allow for IDE and
platform agnostic builds of FFF.

Update the CI for FFF to use github workflows which don't depend on MS VC.
The workflow added will verify the pull requests sent to master buy
running 'buildandtest' which mirrors the developer workflow.

Signed-off-by: Yuval Peress <peress@google.com>
This commit is contained in:
Yuval Peress
2022-08-03 09:27:25 -06:00
parent ff70585de8
commit 2eb067e5a1
71 changed files with 303 additions and 1586 deletions

View File

@@ -0,0 +1,11 @@
#ifndef DRIVER
#define DRIVER
#include <stdint.h>
void driver_write(uint8_t val);
uint8_t driver_read();
void driver_init_device();
#endif /*include guard*/

View File

@@ -0,0 +1,15 @@
#ifndef HARDWARE_ABSTRACTION
#define HARDWARE_ABSTRACTION
#include <stdint.h>
#ifndef TESTING
#define IO_MEM_RD8(ADDR) (*((volatile uint8_t *)(ADDR)))
#define IO_MEM_WR8(ADDR, VAL_8) (*((volatile uint8_t *)(ADDR)) = (VAL_8))
#else
/* In testing use fake functions to record calls to IO memory */
uint8_t IO_MEM_RD8(uint32_t reg);
void IO_MEM_WR8(uint32_t reg, uint8_t val);
#endif
#endif /* Include guard */

View File

@@ -0,0 +1,13 @@
#ifndef REGISTERS_H_
#define REGISTERS_H_
#define DRIVER_OUTPUT_REGISTER 0xFFAAu
#define DRIVER_INPUT_REGISTER 0XFFABu
#define DRIVER_PERIPHERAL_ENABLE_REG 0xFFACu
#define DRIVER_PERIPHERAL_INITIALIZE_REG 0xFFACu
#define HARDWARE_VERSION_REGISTER 0xFF00u
#define HARDWARE_REV_A 0x00u
#define HARDWARE_REV_B 0x01u
#endif /* REGISTERS_H_ */