3333#define Q16_16_FRACTIONAL_BITS (1 << Q16_16_Q_BITS)
3434
3535/* Converts a Q16.16 fixed-point value to an int16. */
36- int16_t q16_16_fp_to_int16 (int32_t fixedValue ) {
36+ int16_t __not_in_flash_func ( q16_16_fp_to_int16 ) (int32_t fixedValue ) {
3737 /* Shift the fixed-point value right by the number of Q-bits to obtain the
3838 integral part of the value. */
3939 return (int16_t )(fixedValue >> Q16_16_Q_BITS );
@@ -71,7 +71,7 @@ int32_t q16_16_int32_to_fp(int32_t value) {
7171}
7272
7373/* Multiplies two Q16.16 fixed-point values. */
74- int32_t q16_16_multiply (int32_t a , int32_t b ) {
74+ int32_t __not_in_flash_func ( q16_16_multiply ) (int32_t a , int32_t b ) {
7575 return (int32_t )((((int64_t )a ) * b ) >> Q16_16_Q_BITS );
7676}
7777
@@ -80,7 +80,7 @@ int32_t q16_16_divide(int32_t a, int32_t b) {
8080 return (int32_t )(((int64_t )a << Q16_16_Q_BITS ) / b );
8181}
8282
83- int32_t q16_16_sin (int32_t fixedValue ) {
83+ int32_t __not_in_flash_func ( q16_16_sin ) (int32_t fixedValue ) {
8484 uint8_t negative = 0 ;
8585 while (fixedValue < Q16_16_0 ) {
8686 fixedValue += Q16_16_PI ;
@@ -112,7 +112,7 @@ int32_t q16_16_sin01(int32_t fixedValue) {
112112 return q16_16_multiply (Q16_16_0_5 , sin5 ) + Q16_16_0_5 ;
113113}
114114
115- int32_t q16_16_cos (int32_t fixedValue ) {
115+ int32_t __not_in_flash_func ( q16_16_cos ) (int32_t fixedValue ) {
116116 return q16_16_multiply (Q16_16_MINUS_1 ,
117117 q16_16_sin (fixedValue - Q16_16_PI_OVER_2 ));
118118}
0 commit comments