8000 Replace port.h with mphalport.h. · davidgiven/micropython@056b82f · GitHub
[go: up one dir, main page]

Skip to content

Commit 056b82f

Browse files
committed
Replace port.h with mphalport.h.
1 parent 93f5f8e commit 056b82f

11 files changed

+25
-53
lines changed

ports/tc32/boards/pins_prefix.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// pins_prefix.c becomes the initial portion of the generated pins file.
22

3-
#include "port.h"
4-
53
#include "extmod/modmachine.h"
64
#include "machine_pin.h"
75
#include "py/mphal.h"

ports/tc32/machine_pin.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include <stdio.h>
2828
#include <string.h>
2929

30-
#include "port.h"
30+
#include "mphalport.h"
3131

3232
#include "extmod/modmachine.h"
3333
#include "extmod/virtpin.h"

ports/tc32/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
* THE SOFTWARE.
2525
*/
2626

27-
#include "port.h"
27+
#include "mphalport.h"
2828

2929
#include "extmod/modmachine.h"
3030
#include "extmod/vfs.h"
@@ -103,7 +103,7 @@ MP_NOINLINE static void soft_init() {
103103
gc_init((void *)&_end_bss_, (void *)0x80bc00);
104104

105105
/* Set up the stack corruption flag byte. */
106-
*(uint8_t*)0x80bc00 = 42;
106+
*(uint8_t *)0x80bc00 = 42;
107107

108108
mp_init();
109109
machine_init();

ports/tc32/modmachine.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,10 @@
2727
// This file is never compiled standalone, it's included directly from
2828
// extmod/modmachine.c via MICROPY_PY_MACHINE_INCLUDEFILE.
2929

30+
#include "mphalport.h"
31+
3032
#include "modmachine.h"
3133
#include "machine_pin.h"
32-
#include "port.h"
3334
#include "py/mphal.h"
3435

3536
#define MICROPY_PY_MACHINE_EXTRA_GLOBALS \

ports/tc32/modmachine.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#ifndef MICROPY_INCLUDED_TC32_MODMACHINE_H
2828
#define MICROPY_INCLUDED_TC32_MODMACHINE_H
2929

30-
#include "port.h"
30+
#include "mphalport.h"
3131
#include "py/obj.h"
3232

3333
void machine_init(void);

ports/tc32/modtc32.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#ifndef MICROPY_INCLUDED_TC32_MODTC32_H
2828
#define MICROPY_INCLUDED_TC32_MODTC32_H
2929

30-
#include "port.h"
30+
#include "mphalport.h"
3131
#include "py/obj.h"
3232

3333
extern const mp_obj_type_t tc32_flash_type;

ports/tc32/mphalport.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
* THE SOFTWARE.
2525
*/
2626

27-
#include "port.h"
27+
#include "mphalport.h"
28+
2829
#include "py/mphal.h"
2930
#include "py/stream.h"
3031

ports/tc32/mphalport.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,19 @@
2626

2727
#pragma once
2828

29+
#include "drivers/5316/bsp.h"
30+
#include "drivers/5316/clock.h"
31+
#include "drivers/5316/compiler.h"
32+
#include "drivers/5316/driver_5316.h"
33+
#include "drivers/5316/gpio.h"
34+
#include "drivers/5316/timer.h"
35+
#include "drivers/5316/uart.h"
36+
37+
#undef __SIZE_TYPE__
38+
#define __SIZE_TYPE__ u32
39+
#undef __WCHAR_TYPE__
40+
#define __WCHAR_TYPE__ u16
41+
42+
extern void uart_init(void);
43+
2944
extern void mp_hal_set_interrupt_char(char c);

ports/tc32/port.h

Lines changed: 0 additions & 42 deletions
This file was deleted.

ports/tc32/tc32_flash.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
#include <stdio.h>
2828

29-
#include "port.h"
29+
#include "mphalport.h"
3030

3131
#include "extmod/vfs.h"
3232
#include "modtc32.h"

ports/tc32/tc32_screen.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
*/
2626

2727
#include "modtc32.h"
28-
#include "port.h"
2928
#include "py/binary.h"
3029
#include "py/mphal.h"
3130
#include "py/runtime.h"

0 commit comments

Comments
 (0)
0