aboutsummaryrefslogtreecommitdiff
path: root/src/entropy
diff options
context:
space:
mode:
Diffstat (limited to 'src/entropy')
-rw-r--r--src/entropy/main.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/entropy/main.c b/src/entropy/main.c
index f7663f5..11ec788 100644
--- a/src/entropy/main.c
+++ b/src/entropy/main.c
@@ -42,8 +42,8 @@
extern DMA_HandleTypeDef hdma_tim;
-UART_HandleTypeDef *huart;
-__IO ITStatus UartReady = RESET;
+static UART_HandleTypeDef *huart;
+static __IO ITStatus UartReady = RESET;
static union {
uint8_t rnd[257]; /* 256 bytes + 1 for use in the POST */
@@ -73,14 +73,14 @@ static struct DMA_params DMA = {
/* The main work horse functions */
-void get_entropy32(uint32_t num_bytes, uint32_t buf_idx);
-void perform_delta32(uint32_t count, const uint32_t start);
+static void get_entropy32(uint32_t num_bytes, uint32_t buf_idx);
+static void perform_delta32(uint32_t count, const uint32_t start);
/* Various support functions */
-inline uint32_t get_one_bit(void) __attribute__((__always_inline__));
-volatile uint32_t *restart_DMA(void);
-inline volatile uint32_t *get_DMA_read_buf(void);
-inline uint32_t safe_get_counter(volatile uint32_t *dmabuf, const uint32_t dmabuf_idx);
-void check_uart_rx(UART_HandleTypeDef *this);
+static inline uint32_t get_one_bit(void) __attribute__((__always_inline__));
+static volatile uint32_t *restart_DMA(void);
+static inline volatile uint32_t *get_DMA_read_buf(void);
+static inline uint32_t safe_get_counter(volatile uint32_t *dmabuf, const uint32_t dmabuf_idx);
+static void check_uart_rx(UART_HandleTypeDef *this);
/* static void Error_Handler(void); */
@@ -247,7 +247,7 @@ inline void get_entropy32(uint32_t count, const uint32_t start)
* @param None
* @retval One bit, in the LSB of an uint32_t since this is a 32 bit MCU.
*/
-inline uint32_t get_one_bit()
+static inline uint32_t get_one_bit()
{
register uint32_t a, b, temp;
/* Start at end of buffer so restart_DMA() is called. */
@@ -298,7 +298,7 @@ inline uint32_t get_one_bit()
* @param None
* @retval Pointer to buffer currently being read from.
*/
-inline volatile uint32_t *get_DMA_read_buf(void)
+static inline volatile uint32_t *get_DMA_read_buf(void)
{
return DMA.write_buf ? DMA.buf0 : DMA.buf1;
}
@@ -308,7 +308,7 @@ inline volatile uint32_t *get_DMA_read_buf(void)
* @param None
* @retval Pointer to buffer currently being written to.
*/
-inline volatile uint32_t *get_DMA_write_buf(void)
+static inline volatile uint32_t *get_DMA_write_buf(void)
{
return DMA.write_buf ? DMA.buf1 : DMA.buf0;
}
@@ -345,7 +345,7 @@ volatile uint32_t *restart_DMA(void)
* @param dmabuf_idx: Word index into `dmabuf'.
* @retval One Timer IC counter value.
*/
-inline uint32_t safe_get_counter(volatile uint32_t *dmabuf, const uint32_t dmabuf_idx) {
+static inline uint32_t safe_get_counter(volatile uint32_t *dmabuf, const uint32_t dmabuf_idx) {
register uint32_t a;
/* Prevent re-use of values. DMA stored values are <= 0xffff. */
do {