memtest86plus/lib/read.h

26 lines
747 B
C
Raw Normal View History

2020-05-24 15:30:55 -05:00
// SPDX-License-Identifier: GPL-2.0
#ifndef READ_H
#define READ_H
/**
* \file
*
2020-05-24 15:30:55 -05:00
* Provides a function to read a numeric value.
*
* Copyright (C) 2020-2022 Martin Whitaker.
2020-05-24 15:30:55 -05:00
*/
#include <stdint.h>
/**
2020-05-24 15:30:55 -05:00
* Returns an unsigned numeric value entered on the keyboard. Echoes the
* input to the display field located at (row,col), limiting it to field_width
* characters. If the entered value is prefixed by "0x", assumes base 16,
* otherwise assumes base 10. If the value is suffixed by 'K', 'P', 'M',
* 'G', or 'T', the returned value will be scaled by 2^10, 2^12, 2^20,
* 2^30, or 2^40 accordingly. The returned value will also be scaled by
* 2^shift.
2020-05-24 15:30:55 -05:00
*/
uintptr_t read_value(int x, int y, int field_width, int shift);
2020-05-24 15:30:55 -05:00
#endif // READ_H