~ruther/CTU-FEE-B0B35APO-Semestral-project

ref: 4c2fc8e87b643bedf604ca9854273fa5a073dcb4 CTU-FEE-B0B35APO-Semestral-project/lib-pheripherals/include/direction.h -rw-r--r-- 466 bytes
4c2fc8e8 — František Boháček fix: text viewer wrong character 3 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#ifndef __DIRECTION_H__
#define __DIRECTION_H__

#include <stdint.h>

typedef enum {
  UP,
  LEFT,
  DOWN,
  RIGHT,
} direction_t;

/**
 * @brief Step direction by amount to direction
 *
 * @param direction what direction to step
 * @param x where to save x value
 * @param y where to save y value
 * @param amount step size
 */
void direction_move_xy(direction_t direction, int32_t *x, int32_t *y,
                       int16_t amount);

#endif // __DIRECTION_H__
Do not follow this link