contrib/firmware: add new adapter ANGIE's firmware/bitstream code
[openocd.git] / contrib / firmware / angie / c / include / delay.h
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /****************************************************************
3 File : delay.h *
4 Contents : Delays handling header file for NanoXplore *
5 USB-JTAG ANGIE adapter hardware. *
6 Based on openULINK project code by: Martin Schmoelzer. *
7 Copyright 2023, Ahmed Errached BOUDJELIDA, NanoXplore SAS. *
8 <aboudjelida@nanoxplore.com> *
9 <ahmederrachedbjld@gmail.com> *
10 *****************************************************************/
11
12 #ifndef __DELAY_H
13 #define __DELAY_H
14
15 #include <stdint.h>
16
17 void syncdelay(uint8_t count);
18 void delay_5us(void);
19 void delay_1ms(void);
20 void delay_us(uint16_t delay);
21 void delay_ms(uint16_t delay);
22
23 #ifndef _IFREQ
24 #define _IFREQ 48000 /* IFCLK frequency in kHz */
25 #endif
26
27 /* CFREQ can be any one of: 48000, 24000, or 12000 */
28 #ifndef _CFREQ
29 #define _CFREQ 48000 /* CLKOUT frequency in kHz */
30 #endif
31
32 #if (_IFREQ < 5000)
33 #error "_IFREQ too small! Valid Range: 5000 to 48000..."
34 #endif
35
36 #if (_IFREQ > 48000)
37 #error "_IFREQ too large! Valid Range: 5000 to 48000..."
38 #endif
39
40 #if (_CFREQ != 48000)
41 #if (_CFREQ != 24000)
42 #if (_CFREQ != 12000)
43 #error "_CFREQ invalid! Valid values: 48000, 24000, 12000..."
44 #endif
45 #endif
46 #endif
47
48 /* Synchronization Delay formula: see TRM section 15-14 */
49 #define _SCYCL (3 * (_CFREQ) + 5 * (_IFREQ) - 1) / (2 * (_IFREQ))
50 #endif

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)