From 2be45dd682f0ce01e4a1061375e96ce2c501a187 Mon Sep 17 00:00:00 2001 From: robert-hh Date: Sat, 6 Jul 2024 09:18:22 +0200 Subject: [PATCH 1/6] extmod/modmachine: Allow more than one argument to machine.freq(). The limit is set by a `MICROPY_PY_MACHINE_FREQ_NUM_ARGS_MAX` define, which defaults to 1 and is set for stm32 to 4. For stm32 this fixes a regression introduced in commit e1ec6af654b1c5c4a973b6c6b029ee68bb92eb89 where the maximum number of arguments was changed from 4 to 1. Signed-off-by: robert-hh --- extmod/modmachine.c | 2 +- ports/stm32/mpconfigport.h | 1 + py/mpconfig.h | 5 +++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/extmod/modmachine.c b/extmod/modmachine.c index 2a7e315bbb0ce..2fe72817b6c2a 100644 --- a/extmod/modmachine.c +++ b/extmod/modmachine.c @@ -109,7 +109,7 @@ static mp_obj_t machine_freq(size_t n_args, const mp_obj_t *args) { return mp_const_none; } } -MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(machine_freq_obj, 0, 1, machine_freq); +MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(machine_freq_obj, 0, MICROPY_PY_MACHINE_FREQ_NUM_ARGS_MAX, machine_freq); static mp_obj_t machine_lightsleep(size_t n_args, const mp_obj_t *args) { mp_machine_lightsleep(n_args, args); diff --git a/ports/stm32/mpconfigport.h b/ports/stm32/mpconfigport.h index 9e1e24cf23828..bd1ab671e071d 100644 --- a/ports/stm32/mpconfigport.h +++ b/ports/stm32/mpconfigport.h @@ -113,6 +113,7 @@ #define MICROPY_PY_MACHINE_INCLUDEFILE "ports/stm32/modmachine.c" #define MICROPY_PY_MACHINE_RESET (1) #define MICROPY_PY_MACHINE_BARE_METAL_FUNCS (1) +#define MICROPY_PY_MACHINE_FREQ_NUM_ARGS_MAX (4) #define MICROPY_PY_MACHINE_BOOTLOADER (1) #define MICROPY_PY_MACHINE_ADC (1) #define MICROPY_PY_MACHINE_ADC_INCLUDEFILE "ports/stm32/machine_adc.c" diff --git a/py/mpconfig.h b/py/mpconfig.h index bc6bf75fe57c5..346d0c21e1222 100644 --- a/py/mpconfig.h +++ b/py/mpconfig.h @@ -1736,6 +1736,11 @@ typedef double mp_float_t; #define MICROPY_PY_MACHINE_RESET (0) #endif +// Maximum number of arguments for machine.freq() +#ifndef MICROPY_PY_MACHINE_FREQ_NUM_ARGS_MAX +#define MICROPY_PY_MACHINE_FREQ_NUM_ARGS_MAX (1) +#endif + // Whether to include: bitstream #ifndef MICROPY_PY_MACHINE_BITSTREAM #define MICROPY_PY_MACHINE_BITSTREAM (0) From 20b00ca501f5e7ff096ae3e31c3e7e7d99963d23 Mon Sep 17 00:00:00 2001 From: iabdalkader Date: Wed, 24 Apr 2024 19:58:06 +0200 Subject: [PATCH 2/6] extmod/network_nina: Fix the AP security mode constants. The only AP security mode supported is actually WPA/WPA2 not WEP. The firmware command `0x19` starts the AP using `WIFI_AUTH_WPA_WPA2_PSK` mode. There are no functional changes in this commit, it just fixes the constant names and removes the useless sanity checks for WEP. Signed-off-by: iabdalkader --- drivers/ninaw10/nina_wifi_drv.c | 8 ++++---- extmod/network_ninaw10.c | 14 +------------- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/drivers/ninaw10/nina_wifi_drv.c b/drivers/ninaw10/nina_wifi_drv.c index 6e4df84294c3d..1aaeec5a09c84 100644 --- a/drivers/ninaw10/nina_wifi_drv.c +++ b/drivers/ninaw10/nina_wifi_drv.c @@ -95,7 +95,7 @@ typedef enum { // AP mode commands. NINA_CMD_START_AP_OPEN = 0x18, - NINA_CMD_START_AP_WEP = 0x19, + NINA_CMD_START_AP_WPA = 0x19, // AP mode scan commands. NINA_CMD_AP_START_SCAN = 0x36, @@ -395,7 +395,7 @@ int nina_start_ap(const char *ssid, uint8_t security, const char *key, uint16_t uint8_t status = NINA_STATUS_AP_FAILED; if ((key == NULL && security != NINA_SEC_OPEN) || - (security != NINA_SEC_OPEN && security != NINA_SEC_WEP)) { + (security != NINA_SEC_OPEN && security != NINA_SEC_WPA_PSK)) { return -1; } @@ -406,8 +406,8 @@ int nina_start_ap(const char *ssid, uint8_t security, const char *key, uint16_t return -1; } break; - case NINA_SEC_WEP: - if (nina_send_command_read_ack(NINA_CMD_START_AP_WEP, + case NINA_SEC_WPA_PSK: + if (nina_send_command_read_ack(NINA_CMD_START_AP_WPA, 3, ARG_8BITS, NINA_ARGS(ARG_STR(ssid), ARG_STR(key), ARG_BYTE(channel))) != SPI_ACK) { return -1; } diff --git a/extmod/network_ninaw10.c b/extmod/network_ninaw10.c index 62961f871fb8d..a9abd5776e053 100644 --- a/extmod/network_ninaw10.c +++ b/extmod/network_ninaw10.c @@ -266,7 +266,7 @@ static mp_obj_t network_ninaw10_connect(mp_uint_t n_args, const mp_obj_t *pos_ar static const mp_arg_t allowed_args[] = { { MP_QSTR_ssid, MP_ARG_REQUIRED | MP_ARG_OBJ, {.u_obj = MP_OBJ_NULL} }, { MP_QSTR_key, MP_ARG_OBJ, {.u_obj = mp_const_none} }, - { MP_QSTR_security, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = -1} }, + { MP_QSTR_security, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = NINA_SEC_WPA_PSK} }, { MP_QSTR_channel, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 1} }, }; @@ -277,7 +277,6 @@ static mp_obj_t network_ninaw10_connect(mp_uint_t n_args, const mp_obj_t *pos_ar // get ssid const char *ssid = mp_obj_str_get_str(args[ARG_ssid].u_obj); - if (strlen(ssid) == 0) { mp_raise_ValueError(MP_ERROR_TEXT("SSID can't be empty")); } @@ -290,12 +289,6 @@ static mp_obj_t network_ninaw10_connect(mp_uint_t n_args, const mp_obj_t *pos_ar // get security mode mp_uint_t security = args[ARG_security].u_int; - if (security == -1 && self->itf == MOD_NETWORK_STA_IF) { - security = NINA_SEC_WPA_PSK; - } else if (security == -1 && self->itf == MOD_NETWORK_AP_IF) { - security = NINA_SEC_WEP; - } - // Ensure that the key is not empty if a security mode is used. if (security != NINA_SEC_OPEN && strlen(key) == 0) { mp_raise_ValueError(MP_ERROR_TEXT("key can't be empty")); @@ -326,11 +319,6 @@ static mp_obj_t network_ninaw10_connect(mp_uint_t n_args, const mp_obj_t *pos_ar soft_timer_reinsert(&mp_wifi_poll_timer, NINAW10_POLL_INTERVAL); } else { mp_uint_t channel = args[ARG_channel].u_int; - - if (security != NINA_SEC_OPEN && security != NINA_SEC_WEP) { - mp_raise_msg(&mp_type_OSError, MP_ERROR_TEXT("AP mode only supports WEP or OPEN security modes")); - } - // Initialize WiFi in AP mode. if (nina_start_ap(ssid, security, key, channel) != 0) { mp_raise_msg(&mp_type_OSError, MP_ERROR_TEXT("failed to start in AP mode")); From ee1036023ef199636d96e70c6c7ed587ccaab92e Mon Sep 17 00:00:00 2001 From: robert-hh Date: Mon, 15 May 2023 11:17:27 +0200 Subject: [PATCH 3/6] extmod/machine_spi: Support firstbit=LSB for machine.SoftSPI. Being able to send data out in LSB format can be useful, and having support in the low-level driver is much better than requiring Python code to reorder the bits before sending them / after receiving them. In particular if the hardware does not support the LSB format (eg RP2040) then one needs to use the SoftSPI in LSB mode. For this change a default definition of `MICROPY_PY_MACHINE_SPI_MSB/_LSB` was added to `py/mpconfig.h`, making them available to all ports. The identical defines in `esp32/mpconfigport.h` were deleted. Resolves issues #5340, #11404. Signed-off-by: robert-hh --- drivers/bus/softspi.c | 30 ++++++++++++++++++++---------- drivers/bus/spi.h | 1 + extmod/machine_spi.c | 20 ++++++++------------ ports/esp32/mpconfigport.h | 2 -- py/mpconfig.h | 6 ++++++ 5 files changed, 35 insertions(+), 24 deletions(-) diff --git a/drivers/bus/softspi.c b/drivers/bus/softspi.c index bc12d89d3b7e6..7d687a1a2fdf4 100644 --- a/drivers/bus/softspi.c +++ b/drivers/bus/softspi.c @@ -44,28 +44,36 @@ int mp_soft_spi_ioctl(void *self_in, uint32_t cmd) { return 0; } +static uint8_t swap_bits(uint8_t byte) { + const static uint8_t swap_table[16] = { + 0x00, 0x08, 0x04, 0x0c, 0x02, 0x0a, 0x06, 0x0e, + 0x01, 0x09, 0x05, 0x0d, 0x03, 0x0b, 0x07, 0x0f + }; + return ((swap_table[byte & 0x0f] << 4) | swap_table[byte >> 4]); +} + void mp_soft_spi_transfer(void *self_in, size_t len, const uint8_t *src, uint8_t *dest) { mp_soft_spi_obj_t *self = (mp_soft_spi_obj_t*)self_in; uint32_t delay_half = self->delay_half; - // only MSB transfer is implemented - // If a port defines MICROPY_HW_SOFTSPI_MIN_DELAY, and the configured // delay_half is equal to this value, then the software SPI implementation // will run as fast as possible, limited only by CPU speed and GPIO time. #ifdef MICROPY_HW_SOFTSPI_MIN_DELAY if (delay_half == MICROPY_HW_SOFTSPI_MIN_DELAY) { for (size_t i = 0; i < len; ++i) { - uint8_t data_out = src[i]; + uint8_t data_out = self->firstbit != MICROPY_PY_MACHINE_SPI_MSB ? + src[i] : swap_bits(src[i]); uint8_t data_in = 0; - for (int j = 0; j < 8; ++j, data_out <<= 1) { - mp_hal_pin_write(self->mosi, (data_out >> 7) & 1); + for (int j = 0; j < 8; ++j, data_out >>= 1) { + mp_hal_pin_write(self->mosi, data_out & 1); mp_hal_pin_write(self->sck, 1 - self->polarity); data_in = (data_in << 1) | mp_hal_pin_read(self->miso); mp_hal_pin_write(self->sck, self->polarity); } if (dest != NULL) { - dest[i] = data_in; + dest[i] = self->firstbit == MICROPY_PY_MACHINE_SPI_MSB ? + data_in : swap_bits(data_in); } } return; @@ -73,10 +81,11 @@ void mp_soft_spi_transfer(void *self_in, size_t len, const uint8_t *src, uint8_t #endif for (size_t i = 0; i < len; ++i) { - uint8_t data_out = src[i]; + uint8_t data_out = self->firstbit != MICROPY_PY_MACHINE_SPI_MSB ? + src[i] : swap_bits(src[i]); uint8_t data_in = 0; - for (int j = 0; j < 8; ++j, data_out <<= 1) { - mp_hal_pin_write(self->mosi, (data_out >> 7) & 1); + for (int j = 0; j < 8; ++j, data_out >>= 1) { + mp_hal_pin_write(self->mosi, data_out & 1); if (self->phase == 0) { mp_hal_delay_us_fast(delay_half); mp_hal_pin_write(self->sck, 1 - self->polarity); @@ -94,7 +103,8 @@ void mp_soft_spi_transfer(void *self_in, size_t len, const uint8_t *src, uint8_t } } if (dest != NULL) { - dest[i] = data_in; + dest[i] = self->firstbit == MICROPY_PY_MACHINE_SPI_MSB ? + data_in : swap_bits(data_in); } } } diff --git a/drivers/bus/spi.h b/drivers/bus/spi.h index 6d1b9c2f832ef..df7f790df80f3 100644 --- a/drivers/bus/spi.h +++ b/drivers/bus/spi.h @@ -42,6 +42,7 @@ typedef struct _mp_soft_spi_obj_t { uint32_t delay_half; // microsecond delay for half SCK period uint8_t polarity; uint8_t phase; + uint8_t firstbit; mp_hal_pin_obj_t sck; mp_hal_pin_obj_t mosi; mp_hal_pin_obj_t miso; diff --git a/extmod/machine_spi.c b/extmod/machine_spi.c index a1d18c905247a..5be30e9476b90 100644 --- a/extmod/machine_spi.c +++ b/extmod/machine_spi.c @@ -33,12 +33,6 @@ #include "extmod/modmachine.h" -// if a port didn't define MSB/LSB constants then provide them -#ifndef MICROPY_PY_MACHINE_SPI_MSB -#define MICROPY_PY_MACHINE_SPI_MSB (0) -#define MICROPY_PY_MACHINE_SPI_LSB (1) -#endif - /******************************************************************************/ // MicroPython bindings for generic machine.SPI @@ -154,9 +148,9 @@ static uint32_t baudrate_to_delay_half(uint32_t baudrate) { static void mp_machine_soft_spi_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { mp_machine_soft_spi_obj_t *self = MP_OBJ_TO_PTR(self_in); - mp_printf(print, "SoftSPI(baudrate=%u, polarity=%u, phase=%u," + mp_printf(print, "SoftSPI(baudrate=%u, polarity=%u, phase=%u, firstbit=%u," " sck=" MP_HAL_PIN_FMT ", mosi=" MP_HAL_PIN_FMT ", miso=" MP_HAL_PIN_FMT ")", - baudrate_from_delay_half(self->spi.delay_half), self->spi.polarity, self->spi.phase, + baudrate_from_delay_half(self->spi.delay_half), self->spi.polarity, self->spi.phase, self->spi.firstbit, mp_hal_pin_name(self->spi.sck), mp_hal_pin_name(self->spi.mosi), mp_hal_pin_name(self->spi.miso)); } @@ -185,9 +179,7 @@ static mp_obj_t mp_machine_soft_spi_make_new(const mp_obj_type_t *type, size_t n if (args[ARG_bits].u_int != 8) { mp_raise_ValueError(MP_ERROR_TEXT("bits must be 8")); } - if (args[ARG_firstbit].u_int != MICROPY_PY_MACHINE_SPI_MSB) { - mp_raise_ValueError(MP_ERROR_TEXT("firstbit must be MSB")); - } + self->spi.firstbit = args[ARG_firstbit].u_int; if (args[ARG_sck].u_obj == MP_OBJ_NULL || args[ARG_mosi].u_obj == MP_OBJ_NULL || args[ARG_miso].u_obj == MP_OBJ_NULL) { @@ -206,11 +198,12 @@ static mp_obj_t mp_machine_soft_spi_make_new(const mp_obj_type_t *type, size_t n static void mp_machine_soft_spi_init(mp_obj_base_t *self_in, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { mp_machine_soft_spi_obj_t *self = (mp_machine_soft_spi_obj_t *)self_in; - enum { ARG_baudrate, ARG_polarity, ARG_phase, ARG_sck, ARG_mosi, ARG_miso }; + enum { ARG_baudrate, ARG_polarity, ARG_phase, ARG_firstbit, ARG_sck, ARG_mosi, ARG_miso }; static const mp_arg_t allowed_args[] = { { MP_QSTR_baudrate, MP_ARG_INT, {.u_int = -1} }, { MP_QSTR_polarity, MP_ARG_INT, {.u_int = -1} }, { MP_QSTR_phase, MP_ARG_INT, {.u_int = -1} }, + { MP_QSTR_firstbit, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = -1} }, { MP_QSTR_sck, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = MP_OBJ_NULL} }, { MP_QSTR_mosi, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = MP_OBJ_NULL} }, { MP_QSTR_miso, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = MP_OBJ_NULL} }, @@ -227,6 +220,9 @@ static void mp_machine_soft_spi_init(mp_obj_base_t *self_in, size_t n_args, cons if (args[ARG_phase].u_int != -1) { self->spi.phase = args[ARG_phase].u_int; } + if (args[ARG_firstbit].u_int != -1) { + self->spi.firstbit = args[ARG_firstbit].u_int; + } if (args[ARG_sck].u_obj != MP_OBJ_NULL) { self->spi.sck = mp_hal_get_pin_obj(args[ARG_sck].u_obj); } diff --git a/ports/esp32/mpconfigport.h b/ports/esp32/mpconfigport.h index 0afb12f85c1ac..558fa6b8c602c 100644 --- a/ports/esp32/mpconfigport.h +++ b/ports/esp32/mpconfigport.h @@ -136,8 +136,6 @@ #define MICROPY_PY_MACHINE_I2C_TRANSFER_WRITE1 (1) #define MICROPY_PY_MACHINE_SOFTI2C (1) #define MICROPY_PY_MACHINE_SPI (1) -#define MICROPY_PY_MACHINE_SPI_MSB (0) -#define MICROPY_PY_MACHINE_SPI_LSB (1) #define MICROPY_PY_MACHINE_SOFTSPI (1) #ifndef MICROPY_PY_MACHINE_DAC #define MICROPY_PY_MACHINE_DAC (SOC_DAC_SUPPORTED) diff --git a/py/mpconfig.h b/py/mpconfig.h index 346d0c21e1222..98893ceb6d97b 100644 --- a/py/mpconfig.h +++ b/py/mpconfig.h @@ -1784,6 +1784,12 @@ typedef double mp_float_t; #define MICROPY_PY_MACHINE_SOFTSPI (0) #endif +// Values of SPI.MSB and SPI.LSB constants +#ifndef MICROPY_PY_MACHINE_SPI_MSB +#define MICROPY_PY_MACHINE_SPI_MSB (0) +#define MICROPY_PY_MACHINE_SPI_LSB (1) +#endif + // Whether to provide the "machine.Timer" class #ifndef MICROPY_PY_MACHINE_TIMER #define MICROPY_PY_MACHINE_TIMER (0) From 4fdad8eabef17aa8b920484e0af7db5ad9889167 Mon Sep 17 00:00:00 2001 From: Owen Date: Mon, 8 Jul 2024 16:55:56 +0200 Subject: [PATCH 4/6] extmod/modre: Rename re_exec to re_exec_helper to avoid clash on BSD. The `re_exec` symbol is the name of a FreeBSD regex function, so needs to be renamed to avoid a clash when building on FreeBSD. (This clash was fixed once before but then accidentally reintroduced by the u-module renaming in 7f5d5c72718af773db751269c6ae14037b9c0727.) Fixes issue #15430. clarify as helper function --- extmod/modre.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/extmod/modre.c b/extmod/modre.c index 2a3fdfd3505f3..f3d2e302a0374 100644 --- a/extmod/modre.c +++ b/extmod/modre.c @@ -194,7 +194,8 @@ static void re_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t mp_printf(print, "", self); } -static mp_obj_t re_exec(bool is_anchored, uint n_args, const mp_obj_t *args) { +// Note: this function can't be named re_exec because it may clash with system headers, eg on FreeBSD +static mp_obj_t re_exec_helper(bool is_anchored, uint n_args, const mp_obj_t *args) { (void)n_args; mp_obj_re_t *self; if (mp_obj_is_type(args[0], (mp_obj_type_t *)&re_type)) { @@ -223,12 +224,12 @@ static mp_obj_t re_exec(bool is_anchored, uint n_args, const mp_obj_t *args) { } static mp_obj_t re_match(size_t n_args, const mp_obj_t *args) { - return re_exec(true, n_args, args); + return re_exec_helper(true, n_args, args); } MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(re_match_obj, 2, 4, re_match); static mp_obj_t re_search(size_t n_args, const mp_obj_t *args) { - return re_exec(false, n_args, args); + return re_exec_helper(false, n_args, args); } MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(re_search_obj, 2, 4, re_search); From abbce268afb351d623c2073a4e4ae62a9e71889a Mon Sep 17 00:00:00 2001 From: Damien George Date: Sun, 14 Jul 2024 23:47:21 +1000 Subject: [PATCH 5/6] github/workflows: Use macos-latest for unix macos CI. macos-11.0 is no longer available. With this change in the macos version, some tests which previously failed now pass, and some different tests now fail. Exclude those that fail from the CI until they can be fixed properly. Signed-off-by: Damien George --- .github/workflows/ports_unix.yml | 2 +- tools/ci.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ports_unix.yml b/.github/workflows/ports_unix.yml index 4473847db61ef..c83f67db875b3 100644 --- a/.github/workflows/ports_unix.yml +++ b/.github/workflows/ports_unix.yml @@ -194,7 +194,7 @@ jobs: run: tests/run-tests.py --print-failures macos: - runs-on: macos-11.0 + runs-on: macos-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 diff --git a/tools/ci.sh b/tools/ci.sh index 9c54d55a4e846..53fcc8b5a3857 100755 --- a/tools/ci.sh +++ b/tools/ci.sh @@ -647,9 +647,9 @@ function ci_unix_macos_build { function ci_unix_macos_run_tests { # Issues with macOS tests: - # - import_pkg7 has a problem with relative imports - # - random_basic has a problem with getrandbits(0) - (cd tests && MICROPY_MICROPYTHON=../ports/unix/build-standard/micropython ./run-tests.py --exclude 'import_pkg7.py' --exclude 'random_basic.py') + # - float_parse and float_parse_doubleprec parse/print floats out by a few mantissa bits + # - ffi_callback crashes for an unknown reason + (cd tests && MICROPY_MICROPYTHON=../ports/unix/build-standard/micropython ./run-tests.py --exclude '(float_parse|float_parse_doubleprec|ffi_callback).py') } function ci_unix_qemu_mips_setup { From 55e75c4ad4131e72a452e6190473098e8a0521c2 Mon Sep 17 00:00:00 2001 From: Lennart Date: Mon, 8 Jul 2024 14:30:01 +0200 Subject: [PATCH 6/6] unix/modtermios: Add more baudrate options. This adds some more baudrate option as they are available in the termios.h header - up to a point that seems reasonable in an embedded context. Signed-off-by: Lennart Schierling --- ports/unix/modtermios.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/ports/unix/modtermios.c b/ports/unix/modtermios.c index b1ad9a450e0c8..d7b94038aa138 100644 --- a/ports/unix/modtermios.c +++ b/ports/unix/modtermios.c @@ -141,6 +141,27 @@ static const mp_rom_map_elem_t mp_module_termios_globals_table[] = { #ifdef B115200 C(B115200), #endif + #ifdef B230400 + C(B230400), + #endif + #ifdef B460800 + C(B460800), + #endif + #ifdef B500000 + C(B500000), + #endif + #ifdef B576000 + C(B576000), + #endif + #ifdef B921600 + C(B921600), + #endif + #ifdef B1000000 + C(B1000000), + #endif + #ifdef B1152000 + C(B1152000) + #endif #undef C };