#ifndef MATH_H_ #define MATH_H_ typedef struct { u16 op1, op2; u16 sqrt, atan; u32 prod; u16 quot, rem; // read bool sqrt_rc, atan_rc, prod_rc, quot_rc, rem_rc; // read cached } MathDevice ; void set_op1_high(MathDevice *math, u8 high); void set_op1_low(MathDevice *math, u8 low); void set_op2_high(MathDevice *math, u8 high); void set_op2_low(MathDevice *math, u8 low); u16 get_sqrt(MathDevice *math); u16 get_atan(MathDevice *math); u32 get_prod(MathDevice *math); u16 get_quot(MathDevice *math); u16 get_rem(MathDevice *math); #endif