Skip to content

Proposed Enhancements #7

@vanthome

Description

@vanthome

Hi, I'm working on an implementation for another MCU and I have some questions/ suggestions.

  • How do you plan to differentiate between the MCU implenentations because you can only one in ApiMcu.h? I propose to use a symbol?
  • The code to write to SPI you propose does not seem to work for me, we use:
  uint8_t rxDat;
  if (HAL_SPI_TransmitReceive(&hspi1, (uint8_t *) &outval, (uint8_t *) &rxDat,
      1, HAL_MAX_DELAY) == HAL_OK) {
    //DBG_PRINTF("HAL RX DAT: %u\n", rxDat);hspi1
    return rxDat;
  }

Why are you using the low level functions for SPI but not the other peripherials?
I think just using HAL is just fine.

  • wait_ms() is used in sx1276.cpp but not defined in the API.
  • mbed.h should only be included if a symbol MBED for example is set
  • extern Serial pcf is also not compatible to any environment and should be put behind a symbol
  • void SX126x::WriteCommand should return the as it is needed for commands like GET_DEVICE_ERRORS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions