![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Original Version of STM Board
function_utilities/function_utilities.h@16:903b5a4433b4, 2019-09-02 (annotated)
- Committer:
- Lightvalve
- Date:
- Mon Sep 02 13:32:33 2019 +0000
- Revision:
- 16:903b5a4433b4
- Parent:
- 13:747daba9cf59
- Child:
- 19:23b7c1ad8683
190902
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 | 11:82d8768d7351 | 23 | double dabs(double tx); |
Lightvalve | 11:82d8768d7351 | 24 | double change_int_to_efloat(int input); |
Lightvalve | 11:82d8768d7351 | 25 | void make_delay(void); |
Lightvalve | 11:82d8768d7351 | 26 | |
Lightvalve | 11:82d8768d7351 | 27 | void ROM_RESET_DATA(void); |
Lightvalve | 11:82d8768d7351 | 28 | void ROM_CALL_DATA(void); |
Lightvalve | 11:82d8768d7351 | 29 | void ROM_INIT_DATA(void); |
Lightvalve | 11:82d8768d7351 | 30 | |
Lightvalve | 11:82d8768d7351 | 31 | void ENC_UPDATE(void); |
Lightvalve | 11:82d8768d7351 | 32 | void ENC_SET_ZERO(void); |
Lightvalve | 13:747daba9cf59 | 33 | void ENC_SET(int32_t value); |
Lightvalve | 11:82d8768d7351 | 34 | void VALVE_POSITION_INIT(void); |
Lightvalve | 11:82d8768d7351 | 35 | void VALVE_PWM(int pwm, double vol_max, double vol_in); |
Lightvalve | 11:82d8768d7351 | 36 | |
Lightvalve | 11:82d8768d7351 | 37 | #endif |