mirror of
https://github.com/hathach/tinyusb.git
synced 2025-03-14 04:18:56 +00:00
fix spi_set_format() -Wnull-dereference when compiling with -Os
This commit is contained in:
parent
c07928e1b3
commit
2871bb0da6
13
.github/workflows/build_util.yml
vendored
13
.github/workflows/build_util.yml
vendored
@ -58,11 +58,10 @@ jobs:
|
||||
shell: bash
|
||||
|
||||
- name: Build
|
||||
if: inputs.toolchain != 'esp-idf'
|
||||
run: |
|
||||
python tools/build.py -s ${{ inputs.build-system }} ${{ steps.setup-toolchain.outputs.build_option }} ${{ steps.set-one-per-family.outputs.build_option }} ${{ matrix.arg }}
|
||||
|
||||
- name: Build using ESP-IDF docker
|
||||
if: inputs.toolchain == 'esp-idf'
|
||||
run: |
|
||||
docker run --rm -v $PWD:/project -w /project espressif/idf:${{ inputs.toolchain_version }} python3 tools/build.py ${{ matrix.arg }}
|
||||
if [ "${{ inputs.toolchain }}" == "esp-idf" ]; then
|
||||
docker run --rm -v $PWD:/project -w /project espressif/idf:${{ inputs.toolchain_version }} python3 tools/build.py ${{ matrix.arg }}
|
||||
else
|
||||
python tools/build.py -s ${{ inputs.build-system }} ${{ steps.setup-toolchain.outputs.build_option }} ${{ steps.set-one-per-family.outputs.build_option }} ${{ matrix.arg }}
|
||||
fi
|
||||
shell: bash
|
||||
|
@ -275,7 +275,15 @@ static void max3421_init(void) {
|
||||
gpio_set_function(MAX3421_SCK_PIN, GPIO_FUNC_SPI);
|
||||
gpio_set_function(MAX3421_MOSI_PIN, GPIO_FUNC_SPI);
|
||||
gpio_set_function(MAX3421_MISO_PIN, GPIO_FUNC_SPI);
|
||||
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wnull-dereference"
|
||||
#endif
|
||||
spi_set_format(MAX3421_SPI, 8, SPI_CPOL_0, SPI_CPHA_0, SPI_MSB_FIRST);
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
}
|
||||
|
||||
//// API to enable/disable MAX3421 INTR pin interrupt
|
||||
|
Loading…
x
Reference in New Issue
Block a user