stm32ral/stm32f4/instances/spi_f411_f412.rs
1#![allow(non_snake_case, non_upper_case_globals)]
2#![allow(non_camel_case_types)]
3//! Serial peripheral interface
4//!
5//! Used by: stm32f411, stm32f412
6
7#[cfg(not(feature = "nosync"))]
8pub use crate::stm32f4::peripherals::spi::Instance;
9pub use crate::stm32f4::peripherals::spi::{RegisterBlock, ResetValues};
10pub use crate::stm32f4::peripherals::spi::{
11 CR1, CR2, CRCPR, DR, I2SCFGR, I2SPR, RXCRCR, SR, TXCRCR,
12};
13
14/// Access functions for the I2S2ext peripheral instance
15pub mod I2S2ext {
16 use super::ResetValues;
17
18 #[cfg(not(feature = "nosync"))]
19 use super::Instance;
20
21 #[cfg(not(feature = "nosync"))]
22 const INSTANCE: Instance = Instance {
23 addr: 0x40003400,
24 _marker: ::core::marker::PhantomData,
25 };
26
27 /// Reset values for each field in I2S2ext
28 pub const reset: ResetValues = ResetValues {
29 CR1: 0x00000000,
30 CR2: 0x00000000,
31 SR: 0x00000002,
32 DR: 0x00000000,
33 CRCPR: 0x00000007,
34 RXCRCR: 0x00000000,
35 TXCRCR: 0x00000000,
36 I2SCFGR: 0x00000000,
37 I2SPR: 0x0000000A,
38 };
39
40 #[cfg(not(feature = "nosync"))]
41 #[allow(renamed_and_removed_lints)]
42 #[allow(private_no_mangle_statics)]
43 #[no_mangle]
44 static mut I2S2ext_TAKEN: bool = false;
45
46 /// Safe access to I2S2ext
47 ///
48 /// This function returns `Some(Instance)` if this instance is not
49 /// currently taken, and `None` if it is. This ensures that if you
50 /// do get `Some(Instance)`, you are ensured unique access to
51 /// the peripheral and there cannot be data races (unless other
52 /// code uses `unsafe`, of course). You can then pass the
53 /// `Instance` around to other functions as required. When you're
54 /// done with it, you can call `release(instance)` to return it.
55 ///
56 /// `Instance` itself dereferences to a `RegisterBlock`, which
57 /// provides access to the peripheral's registers.
58 #[cfg(not(feature = "nosync"))]
59 #[inline]
60 pub fn take() -> Option<Instance> {
61 external_cortex_m::interrupt::free(|_| unsafe {
62 if I2S2ext_TAKEN {
63 None
64 } else {
65 I2S2ext_TAKEN = true;
66 Some(INSTANCE)
67 }
68 })
69 }
70
71 /// Release exclusive access to I2S2ext
72 ///
73 /// This function allows you to return an `Instance` so that it
74 /// is available to `take()` again. This function will panic if
75 /// you return a different `Instance` or if this instance is not
76 /// already taken.
77 #[cfg(not(feature = "nosync"))]
78 #[inline]
79 pub fn release(inst: Instance) {
80 external_cortex_m::interrupt::free(|_| unsafe {
81 if I2S2ext_TAKEN && inst.addr == INSTANCE.addr {
82 I2S2ext_TAKEN = false;
83 } else {
84 panic!("Released a peripheral which was not taken");
85 }
86 });
87 }
88
89 /// Unsafely steal I2S2ext
90 ///
91 /// This function is similar to take() but forcibly takes the
92 /// Instance, marking it as taken irregardless of its previous
93 /// state.
94 #[cfg(not(feature = "nosync"))]
95 #[inline]
96 pub unsafe fn steal() -> Instance {
97 I2S2ext_TAKEN = true;
98 INSTANCE
99 }
100}
101
102/// Raw pointer to I2S2ext
103///
104/// Dereferencing this is unsafe because you are not ensured unique
105/// access to the peripheral, so you may encounter data races with
106/// other users of this peripheral. It is up to you to ensure you
107/// will not cause data races.
108///
109/// This constant is provided for ease of use in unsafe code: you can
110/// simply call for example `write_reg!(gpio, GPIOA, ODR, 1);`.
111pub const I2S2ext: *const RegisterBlock = 0x40003400 as *const _;
112
113/// Access functions for the I2S3ext peripheral instance
114pub mod I2S3ext {
115 use super::ResetValues;
116
117 #[cfg(not(feature = "nosync"))]
118 use super::Instance;
119
120 #[cfg(not(feature = "nosync"))]
121 const INSTANCE: Instance = Instance {
122 addr: 0x40004000,
123 _marker: ::core::marker::PhantomData,
124 };
125
126 /// Reset values for each field in I2S3ext
127 pub const reset: ResetValues = ResetValues {
128 CR1: 0x00000000,
129 CR2: 0x00000000,
130 SR: 0x00000002,
131 DR: 0x00000000,
132 CRCPR: 0x00000007,
133 RXCRCR: 0x00000000,
134 TXCRCR: 0x00000000,
135 I2SCFGR: 0x00000000,
136 I2SPR: 0x0000000A,
137 };
138
139 #[cfg(not(feature = "nosync"))]
140 #[allow(renamed_and_removed_lints)]
141 #[allow(private_no_mangle_statics)]
142 #[no_mangle]
143 static mut I2S3ext_TAKEN: bool = false;
144
145 /// Safe access to I2S3ext
146 ///
147 /// This function returns `Some(Instance)` if this instance is not
148 /// currently taken, and `None` if it is. This ensures that if you
149 /// do get `Some(Instance)`, you are ensured unique access to
150 /// the peripheral and there cannot be data races (unless other
151 /// code uses `unsafe`, of course). You can then pass the
152 /// `Instance` around to other functions as required. When you're
153 /// done with it, you can call `release(instance)` to return it.
154 ///
155 /// `Instance` itself dereferences to a `RegisterBlock`, which
156 /// provides access to the peripheral's registers.
157 #[cfg(not(feature = "nosync"))]
158 #[inline]
159 pub fn take() -> Option<Instance> {
160 external_cortex_m::interrupt::free(|_| unsafe {
161 if I2S3ext_TAKEN {
162 None
163 } else {
164 I2S3ext_TAKEN = true;
165 Some(INSTANCE)
166 }
167 })
168 }
169
170 /// Release exclusive access to I2S3ext
171 ///
172 /// This function allows you to return an `Instance` so that it
173 /// is available to `take()` again. This function will panic if
174 /// you return a different `Instance` or if this instance is not
175 /// already taken.
176 #[cfg(not(feature = "nosync"))]
177 #[inline]
178 pub fn release(inst: Instance) {
179 external_cortex_m::interrupt::free(|_| unsafe {
180 if I2S3ext_TAKEN && inst.addr == INSTANCE.addr {
181 I2S3ext_TAKEN = false;
182 } else {
183 panic!("Released a peripheral which was not taken");
184 }
185 });
186 }
187
188 /// Unsafely steal I2S3ext
189 ///
190 /// This function is similar to take() but forcibly takes the
191 /// Instance, marking it as taken irregardless of its previous
192 /// state.
193 #[cfg(not(feature = "nosync"))]
194 #[inline]
195 pub unsafe fn steal() -> Instance {
196 I2S3ext_TAKEN = true;
197 INSTANCE
198 }
199}
200
201/// Raw pointer to I2S3ext
202///
203/// Dereferencing this is unsafe because you are not ensured unique
204/// access to the peripheral, so you may encounter data races with
205/// other users of this peripheral. It is up to you to ensure you
206/// will not cause data races.
207///
208/// This constant is provided for ease of use in unsafe code: you can
209/// simply call for example `write_reg!(gpio, GPIOA, ODR, 1);`.
210pub const I2S3ext: *const RegisterBlock = 0x40004000 as *const _;
211
212/// Access functions for the SPI1 peripheral instance
213pub mod SPI1 {
214 use super::ResetValues;
215
216 #[cfg(not(feature = "nosync"))]
217 use super::Instance;
218
219 #[cfg(not(feature = "nosync"))]
220 const INSTANCE: Instance = Instance {
221 addr: 0x40013000,
222 _marker: ::core::marker::PhantomData,
223 };
224
225 /// Reset values for each field in SPI1
226 pub const reset: ResetValues = ResetValues {
227 CR1: 0x00000000,
228 CR2: 0x00000000,
229 SR: 0x00000002,
230 DR: 0x00000000,
231 CRCPR: 0x00000007,
232 RXCRCR: 0x00000000,
233 TXCRCR: 0x00000000,
234 I2SCFGR: 0x00000000,
235 I2SPR: 0x0000000A,
236 };
237
238 #[cfg(not(feature = "nosync"))]
239 #[allow(renamed_and_removed_lints)]
240 #[allow(private_no_mangle_statics)]
241 #[no_mangle]
242 static mut SPI1_TAKEN: bool = false;
243
244 /// Safe access to SPI1
245 ///
246 /// This function returns `Some(Instance)` if this instance is not
247 /// currently taken, and `None` if it is. This ensures that if you
248 /// do get `Some(Instance)`, you are ensured unique access to
249 /// the peripheral and there cannot be data races (unless other
250 /// code uses `unsafe`, of course). You can then pass the
251 /// `Instance` around to other functions as required. When you're
252 /// done with it, you can call `release(instance)` to return it.
253 ///
254 /// `Instance` itself dereferences to a `RegisterBlock`, which
255 /// provides access to the peripheral's registers.
256 #[cfg(not(feature = "nosync"))]
257 #[inline]
258 pub fn take() -> Option<Instance> {
259 external_cortex_m::interrupt::free(|_| unsafe {
260 if SPI1_TAKEN {
261 None
262 } else {
263 SPI1_TAKEN = true;
264 Some(INSTANCE)
265 }
266 })
267 }
268
269 /// Release exclusive access to SPI1
270 ///
271 /// This function allows you to return an `Instance` so that it
272 /// is available to `take()` again. This function will panic if
273 /// you return a different `Instance` or if this instance is not
274 /// already taken.
275 #[cfg(not(feature = "nosync"))]
276 #[inline]
277 pub fn release(inst: Instance) {
278 external_cortex_m::interrupt::free(|_| unsafe {
279 if SPI1_TAKEN && inst.addr == INSTANCE.addr {
280 SPI1_TAKEN = false;
281 } else {
282 panic!("Released a peripheral which was not taken");
283 }
284 });
285 }
286
287 /// Unsafely steal SPI1
288 ///
289 /// This function is similar to take() but forcibly takes the
290 /// Instance, marking it as taken irregardless of its previous
291 /// state.
292 #[cfg(not(feature = "nosync"))]
293 #[inline]
294 pub unsafe fn steal() -> Instance {
295 SPI1_TAKEN = true;
296 INSTANCE
297 }
298}
299
300/// Raw pointer to SPI1
301///
302/// Dereferencing this is unsafe because you are not ensured unique
303/// access to the peripheral, so you may encounter data races with
304/// other users of this peripheral. It is up to you to ensure you
305/// will not cause data races.
306///
307/// This constant is provided for ease of use in unsafe code: you can
308/// simply call for example `write_reg!(gpio, GPIOA, ODR, 1);`.
309pub const SPI1: *const RegisterBlock = 0x40013000 as *const _;
310
311/// Access functions for the SPI2 peripheral instance
312pub mod SPI2 {
313 use super::ResetValues;
314
315 #[cfg(not(feature = "nosync"))]
316 use super::Instance;
317
318 #[cfg(not(feature = "nosync"))]
319 const INSTANCE: Instance = Instance {
320 addr: 0x40003800,
321 _marker: ::core::marker::PhantomData,
322 };
323
324 /// Reset values for each field in SPI2
325 pub const reset: ResetValues = ResetValues {
326 CR1: 0x00000000,
327 CR2: 0x00000000,
328 SR: 0x00000002,
329 DR: 0x00000000,
330 CRCPR: 0x00000007,
331 RXCRCR: 0x00000000,
332 TXCRCR: 0x00000000,
333 I2SCFGR: 0x00000000,
334 I2SPR: 0x0000000A,
335 };
336
337 #[cfg(not(feature = "nosync"))]
338 #[allow(renamed_and_removed_lints)]
339 #[allow(private_no_mangle_statics)]
340 #[no_mangle]
341 static mut SPI2_TAKEN: bool = false;
342
343 /// Safe access to SPI2
344 ///
345 /// This function returns `Some(Instance)` if this instance is not
346 /// currently taken, and `None` if it is. This ensures that if you
347 /// do get `Some(Instance)`, you are ensured unique access to
348 /// the peripheral and there cannot be data races (unless other
349 /// code uses `unsafe`, of course). You can then pass the
350 /// `Instance` around to other functions as required. When you're
351 /// done with it, you can call `release(instance)` to return it.
352 ///
353 /// `Instance` itself dereferences to a `RegisterBlock`, which
354 /// provides access to the peripheral's registers.
355 #[cfg(not(feature = "nosync"))]
356 #[inline]
357 pub fn take() -> Option<Instance> {
358 external_cortex_m::interrupt::free(|_| unsafe {
359 if SPI2_TAKEN {
360 None
361 } else {
362 SPI2_TAKEN = true;
363 Some(INSTANCE)
364 }
365 })
366 }
367
368 /// Release exclusive access to SPI2
369 ///
370 /// This function allows you to return an `Instance` so that it
371 /// is available to `take()` again. This function will panic if
372 /// you return a different `Instance` or if this instance is not
373 /// already taken.
374 #[cfg(not(feature = "nosync"))]
375 #[inline]
376 pub fn release(inst: Instance) {
377 external_cortex_m::interrupt::free(|_| unsafe {
378 if SPI2_TAKEN && inst.addr == INSTANCE.addr {
379 SPI2_TAKEN = false;
380 } else {
381 panic!("Released a peripheral which was not taken");
382 }
383 });
384 }
385
386 /// Unsafely steal SPI2
387 ///
388 /// This function is similar to take() but forcibly takes the
389 /// Instance, marking it as taken irregardless of its previous
390 /// state.
391 #[cfg(not(feature = "nosync"))]
392 #[inline]
393 pub unsafe fn steal() -> Instance {
394 SPI2_TAKEN = true;
395 INSTANCE
396 }
397}
398
399/// Raw pointer to SPI2
400///
401/// Dereferencing this is unsafe because you are not ensured unique
402/// access to the peripheral, so you may encounter data races with
403/// other users of this peripheral. It is up to you to ensure you
404/// will not cause data races.
405///
406/// This constant is provided for ease of use in unsafe code: you can
407/// simply call for example `write_reg!(gpio, GPIOA, ODR, 1);`.
408pub const SPI2: *const RegisterBlock = 0x40003800 as *const _;
409
410/// Access functions for the SPI3 peripheral instance
411pub mod SPI3 {
412 use super::ResetValues;
413
414 #[cfg(not(feature = "nosync"))]
415 use super::Instance;
416
417 #[cfg(not(feature = "nosync"))]
418 const INSTANCE: Instance = Instance {
419 addr: 0x40003c00,
420 _marker: ::core::marker::PhantomData,
421 };
422
423 /// Reset values for each field in SPI3
424 pub const reset: ResetValues = ResetValues {
425 CR1: 0x00000000,
426 CR2: 0x00000000,
427 SR: 0x00000002,
428 DR: 0x00000000,
429 CRCPR: 0x00000007,
430 RXCRCR: 0x00000000,
431 TXCRCR: 0x00000000,
432 I2SCFGR: 0x00000000,
433 I2SPR: 0x0000000A,
434 };
435
436 #[cfg(not(feature = "nosync"))]
437 #[allow(renamed_and_removed_lints)]
438 #[allow(private_no_mangle_statics)]
439 #[no_mangle]
440 static mut SPI3_TAKEN: bool = false;
441
442 /// Safe access to SPI3
443 ///
444 /// This function returns `Some(Instance)` if this instance is not
445 /// currently taken, and `None` if it is. This ensures that if you
446 /// do get `Some(Instance)`, you are ensured unique access to
447 /// the peripheral and there cannot be data races (unless other
448 /// code uses `unsafe`, of course). You can then pass the
449 /// `Instance` around to other functions as required. When you're
450 /// done with it, you can call `release(instance)` to return it.
451 ///
452 /// `Instance` itself dereferences to a `RegisterBlock`, which
453 /// provides access to the peripheral's registers.
454 #[cfg(not(feature = "nosync"))]
455 #[inline]
456 pub fn take() -> Option<Instance> {
457 external_cortex_m::interrupt::free(|_| unsafe {
458 if SPI3_TAKEN {
459 None
460 } else {
461 SPI3_TAKEN = true;
462 Some(INSTANCE)
463 }
464 })
465 }
466
467 /// Release exclusive access to SPI3
468 ///
469 /// This function allows you to return an `Instance` so that it
470 /// is available to `take()` again. This function will panic if
471 /// you return a different `Instance` or if this instance is not
472 /// already taken.
473 #[cfg(not(feature = "nosync"))]
474 #[inline]
475 pub fn release(inst: Instance) {
476 external_cortex_m::interrupt::free(|_| unsafe {
477 if SPI3_TAKEN && inst.addr == INSTANCE.addr {
478 SPI3_TAKEN = false;
479 } else {
480 panic!("Released a peripheral which was not taken");
481 }
482 });
483 }
484
485 /// Unsafely steal SPI3
486 ///
487 /// This function is similar to take() but forcibly takes the
488 /// Instance, marking it as taken irregardless of its previous
489 /// state.
490 #[cfg(not(feature = "nosync"))]
491 #[inline]
492 pub unsafe fn steal() -> Instance {
493 SPI3_TAKEN = true;
494 INSTANCE
495 }
496}
497
498/// Raw pointer to SPI3
499///
500/// Dereferencing this is unsafe because you are not ensured unique
501/// access to the peripheral, so you may encounter data races with
502/// other users of this peripheral. It is up to you to ensure you
503/// will not cause data races.
504///
505/// This constant is provided for ease of use in unsafe code: you can
506/// simply call for example `write_reg!(gpio, GPIOA, ODR, 1);`.
507pub const SPI3: *const RegisterBlock = 0x40003c00 as *const _;
508
509/// Access functions for the SPI4 peripheral instance
510pub mod SPI4 {
511 use super::ResetValues;
512
513 #[cfg(not(feature = "nosync"))]
514 use super::Instance;
515
516 #[cfg(not(feature = "nosync"))]
517 const INSTANCE: Instance = Instance {
518 addr: 0x40013400,
519 _marker: ::core::marker::PhantomData,
520 };
521
522 /// Reset values for each field in SPI4
523 pub const reset: ResetValues = ResetValues {
524 CR1: 0x00000000,
525 CR2: 0x00000000,
526 SR: 0x00000002,
527 DR: 0x00000000,
528 CRCPR: 0x00000007,
529 RXCRCR: 0x00000000,
530 TXCRCR: 0x00000000,
531 I2SCFGR: 0x00000000,
532 I2SPR: 0x0000000A,
533 };
534
535 #[cfg(not(feature = "nosync"))]
536 #[allow(renamed_and_removed_lints)]
537 #[allow(private_no_mangle_statics)]
538 #[no_mangle]
539 static mut SPI4_TAKEN: bool = false;
540
541 /// Safe access to SPI4
542 ///
543 /// This function returns `Some(Instance)` if this instance is not
544 /// currently taken, and `None` if it is. This ensures that if you
545 /// do get `Some(Instance)`, you are ensured unique access to
546 /// the peripheral and there cannot be data races (unless other
547 /// code uses `unsafe`, of course). You can then pass the
548 /// `Instance` around to other functions as required. When you're
549 /// done with it, you can call `release(instance)` to return it.
550 ///
551 /// `Instance` itself dereferences to a `RegisterBlock`, which
552 /// provides access to the peripheral's registers.
553 #[cfg(not(feature = "nosync"))]
554 #[inline]
555 pub fn take() -> Option<Instance> {
556 external_cortex_m::interrupt::free(|_| unsafe {
557 if SPI4_TAKEN {
558 None
559 } else {
560 SPI4_TAKEN = true;
561 Some(INSTANCE)
562 }
563 })
564 }
565
566 /// Release exclusive access to SPI4
567 ///
568 /// This function allows you to return an `Instance` so that it
569 /// is available to `take()` again. This function will panic if
570 /// you return a different `Instance` or if this instance is not
571 /// already taken.
572 #[cfg(not(feature = "nosync"))]
573 #[inline]
574 pub fn release(inst: Instance) {
575 external_cortex_m::interrupt::free(|_| unsafe {
576 if SPI4_TAKEN && inst.addr == INSTANCE.addr {
577 SPI4_TAKEN = false;
578 } else {
579 panic!("Released a peripheral which was not taken");
580 }
581 });
582 }
583
584 /// Unsafely steal SPI4
585 ///
586 /// This function is similar to take() but forcibly takes the
587 /// Instance, marking it as taken irregardless of its previous
588 /// state.
589 #[cfg(not(feature = "nosync"))]
590 #[inline]
591 pub unsafe fn steal() -> Instance {
592 SPI4_TAKEN = true;
593 INSTANCE
594 }
595}
596
597/// Raw pointer to SPI4
598///
599/// Dereferencing this is unsafe because you are not ensured unique
600/// access to the peripheral, so you may encounter data races with
601/// other users of this peripheral. It is up to you to ensure you
602/// will not cause data races.
603///
604/// This constant is provided for ease of use in unsafe code: you can
605/// simply call for example `write_reg!(gpio, GPIOA, ODR, 1);`.
606pub const SPI4: *const RegisterBlock = 0x40013400 as *const _;
607
608/// Access functions for the SPI5 peripheral instance
609pub mod SPI5 {
610 use super::ResetValues;
611
612 #[cfg(not(feature = "nosync"))]
613 use super::Instance;
614
615 #[cfg(not(feature = "nosync"))]
616 const INSTANCE: Instance = Instance {
617 addr: 0x40015000,
618 _marker: ::core::marker::PhantomData,
619 };
620
621 /// Reset values for each field in SPI5
622 pub const reset: ResetValues = ResetValues {
623 CR1: 0x00000000,
624 CR2: 0x00000000,
625 SR: 0x00000002,
626 DR: 0x00000000,
627 CRCPR: 0x00000007,
628 RXCRCR: 0x00000000,
629 TXCRCR: 0x00000000,
630 I2SCFGR: 0x00000000,
631 I2SPR: 0x0000000A,
632 };
633
634 #[cfg(not(feature = "nosync"))]
635 #[allow(renamed_and_removed_lints)]
636 #[allow(private_no_mangle_statics)]
637 #[no_mangle]
638 static mut SPI5_TAKEN: bool = false;
639
640 /// Safe access to SPI5
641 ///
642 /// This function returns `Some(Instance)` if this instance is not
643 /// currently taken, and `None` if it is. This ensures that if you
644 /// do get `Some(Instance)`, you are ensured unique access to
645 /// the peripheral and there cannot be data races (unless other
646 /// code uses `unsafe`, of course). You can then pass the
647 /// `Instance` around to other functions as required. When you're
648 /// done with it, you can call `release(instance)` to return it.
649 ///
650 /// `Instance` itself dereferences to a `RegisterBlock`, which
651 /// provides access to the peripheral's registers.
652 #[cfg(not(feature = "nosync"))]
653 #[inline]
654 pub fn take() -> Option<Instance> {
655 external_cortex_m::interrupt::free(|_| unsafe {
656 if SPI5_TAKEN {
657 None
658 } else {
659 SPI5_TAKEN = true;
660 Some(INSTANCE)
661 }
662 })
663 }
664
665 /// Release exclusive access to SPI5
666 ///
667 /// This function allows you to return an `Instance` so that it
668 /// is available to `take()` again. This function will panic if
669 /// you return a different `Instance` or if this instance is not
670 /// already taken.
671 #[cfg(not(feature = "nosync"))]
672 #[inline]
673 pub fn release(inst: Instance) {
674 external_cortex_m::interrupt::free(|_| unsafe {
675 if SPI5_TAKEN && inst.addr == INSTANCE.addr {
676 SPI5_TAKEN = false;
677 } else {
678 panic!("Released a peripheral which was not taken");
679 }
680 });
681 }
682
683 /// Unsafely steal SPI5
684 ///
685 /// This function is similar to take() but forcibly takes the
686 /// Instance, marking it as taken irregardless of its previous
687 /// state.
688 #[cfg(not(feature = "nosync"))]
689 #[inline]
690 pub unsafe fn steal() -> Instance {
691 SPI5_TAKEN = true;
692 INSTANCE
693 }
694}
695
696/// Raw pointer to SPI5
697///
698/// Dereferencing this is unsafe because you are not ensured unique
699/// access to the peripheral, so you may encounter data races with
700/// other users of this peripheral. It is up to you to ensure you
701/// will not cause data races.
702///
703/// This constant is provided for ease of use in unsafe code: you can
704/// simply call for example `write_reg!(gpio, GPIOA, ODR, 1);`.
705pub const SPI5: *const RegisterBlock = 0x40015000 as *const _;