Sungwoo Kim
/
HydraulicControlBoard_Learning
for learning
function_utilities/function_utilities.h@224:985dba42f261, 2020-12-28 (annotated)
- Committer:
- Lightvalve
- Date:
- Mon Dec 28 14:27:11 2020 +0000
- Revision:
- 224:985dba42f261
- Parent:
- 30:8d561f16383b
distribution
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Lightvalve | 11:82d8768d7351 | 1 | #ifndef _FUNCTION_UTILITIES_H |
Lightvalve | 11:82d8768d7351 | 2 | #define _FUNCTION_UTILITIES_H |
Lightvalve | 11:82d8768d7351 | 3 | |
Lightvalve | 16:903b5a4433b4 | 4 | //address (write & read) |
Lightvalve | 16:903b5a4433b4 | 5 | #define ADDR_FLASH_SECTOR_0 ((uint32_t)0x08000000) /* Base @ of Sector 0, 16 Kbytes */ |
Lightvalve | 16:903b5a4433b4 | 6 | #define ADDR_FLASH_SECTOR_1 ((uint32_t)0x08004000) /* Base @ of Sector 1, 16 Kbytes */ |
Lightvalve | 16:903b5a4433b4 | 7 | #define ADDR_FLASH_SECTOR_2 ((uint32_t)0x08008000) /* Base @ of Sector 2, 16 Kbytes */ |
Lightvalve | 16:903b5a4433b4 | 8 | #define ADDR_FLASH_SECTOR_3 ((uint32_t)0x0800C000) /* Base @ of Sector 3, 16 Kbytes */ |
Lightvalve | 16:903b5a4433b4 | 9 | #define ADDR_FLASH_SECTOR_4 ((uint32_t)0x08010000) /* Base @ of Sector 4, 64 Kbytes */ |
Lightvalve | 16:903b5a4433b4 | 10 | #define ADDR_FLASH_SECTOR_5 ((uint32_t)0x08020000) /* Base @ of Sector 5, 128 Kbytes */ |
Lightvalve | 16:903b5a4433b4 | 11 | #define ADDR_FLASH_SECTOR_6 ((uint32_t)0x08040000) /* Base @ of Sector 6, 128 Kbytes */ |
Lightvalve | 16:903b5a4433b4 | 12 | #define ADDR_FLASH_SECTOR_7 ((uint32_t)0x08060000) /* Base @ of Sector 7, 128 Kbytes */ |
Lightvalve | 16:903b5a4433b4 | 13 | |
Lightvalve | 16:903b5a4433b4 | 14 | // sector (erase sector) binary_SNB<<3 |
Lightvalve | 16:903b5a4433b4 | 15 | #define FLASH_Latency_0 ((uint8_t)0x0000) /*!< FLASH Zero Latency cycle */ |
Lightvalve | 16:903b5a4433b4 | 16 | #define FLASH_Latency_1 ((uint8_t)0x0001) /*!< FLASH One Latency cycle */ |
Lightvalve | 16:903b5a4433b4 | 17 | #define FLASH_Latency_2 ((uint8_t)0x0002) /*!< FLASH Two Latency cycles */ |
Lightvalve | 16:903b5a4433b4 | 18 | #define FLASH_Latency_3 ((uint8_t)0x0003) /*!< FLASH Three Latency cycles */ |
Lightvalve | 16:903b5a4433b4 | 19 | #define FLASH_Latency_4 ((uint8_t)0x0004) /*!< FLASH Four Latency cycles */ |
Lightvalve | 16:903b5a4433b4 | 20 | #define FLASH_Latency_5 ((uint8_t)0x0005) /*!< FLASH Five Latency cycles */ |
Lightvalve | 16:903b5a4433b4 | 21 | #define FLASH_Latency_6 ((uint8_t)0x0006) /*!< FLASH Six Latency cycles */ |
Lightvalve | 16:903b5a4433b4 | 22 | |
Lightvalve | 30:8d561f16383b | 23 | float dabs(float tx); |
Lightvalve | 30:8d561f16383b | 24 | float change_int_to_efloat(int input); |
Lightvalve | 11:82d8768d7351 | 25 | void make_delay(void); |
Lightvalve | 11:82d8768d7351 | 26 | |
Lightvalve | 11:82d8768d7351 | 27 | void ROM_CALL_DATA(void); |
Lightvalve | 11:82d8768d7351 | 28 | |
Lightvalve | 11:82d8768d7351 | 29 | void ENC_UPDATE(void); |
Lightvalve | 11:82d8768d7351 | 30 | void ENC_SET_ZERO(void); |
Lightvalve | 13:747daba9cf59 | 31 | void ENC_SET(int32_t value); |
Lightvalve | 11:82d8768d7351 | 32 | void VALVE_POSITION_INIT(void); |
Lightvalve | 30:8d561f16383b | 33 | void VALVE_PWM(int pwm, float vol_max, float vol_in); |
Lightvalve | 11:82d8768d7351 | 34 | |
Lightvalve | 30:8d561f16383b | 35 | #endif |