This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
08000264 <__aeabi_lmul>: | |
8000264: b5f0 push {r4, r5, r6, r7, lr} | |
8000266: 46ce mov lr, r9 | |
8000268: 4699 mov r9, r3 | |
800026a: 0c03 lsrs r3, r0, #16 | |
800026c: 469c mov ip, r3 | |
800026e: 0413 lsls r3, r2, #16 | |
8000270: 4647 mov r7, r8 | |
8000272: 0c1b lsrs r3, r3, #16 | |
8000274: 001d movs r5, r3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdbool.h> | |
#include <stdint.h> | |
#include <float.h> | |
/* return the smaller of two values */ | |
#define min(a, b) \ | |
({ __auto_type _a = (a); \ | |
__auto_type _b = (b); \ | |
_a < _b ? _a : _b; }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include "timeit.h" | |
/* Shell sort with Ciura gap array */ | |
static void shell_sort(int *arr, int n) | |
{ | |
/* Marcin Ciura gap array */ | |
static const int gaps[] = {701, 301, 132, 57, 23, 10, 4, 1}; | |
static const int gap_cnt = sizeof(gaps)/sizeof(gaps[0]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @file log.h | |
* @author Tomasz Watorowski (tomasz.watorowski@gmail.com) | |
* @date 2025-05-22 | |
* | |
* @copyright Copyright (c) 2025 | |
**/ | |
#ifndef LOG_H | |
#define LOG_H |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdint.h> | |
#include <stdarg.h> | |
/* get the next value from the register taps: (32, 22, 2, 1, 0)*/ | |
uint32_t LFSR32_Next(uint32_t x) | |
{ | |
/* get the bit generated by the taps */ | |
uint32_t bit = ((x >> 0) ^ (x >> 10) ^ (x >> 30) ^ (x >> 31)) & 1; | |
/* push the data around */ | |
return ((x >> 1) | (bit << 31)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
Fs = 48000 | |
# signal frequency | |
F = 12000 | |
# sampling frequency (4x the signal freq) | |
Fs = 4 * F | |
# initial phase offset in degrees |