X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;ds=sidebyside;f=bertos%2Fcpu%2Favr%2Fdrv%2Fser_avr.h;h=237c3040d03dfacaa1ece8d8dd025626c4f488e0;hb=98c76a5f903d9e12d9af283d71ed61d8768969a7;hp=4b5518b47ea32f8fc58c38519f9b63a72e698346;hpb=345f93de1963f49bdb194d2b06c8c5d7ba0a3e5f;p=bertos.git diff --git a/bertos/cpu/avr/drv/ser_avr.h b/bertos/cpu/avr/drv/ser_avr.h index 4b5518b4..237c3040 100644 --- a/bertos/cpu/avr/drv/ser_avr.h +++ b/bertos/cpu/avr/drv/ser_avr.h @@ -60,6 +60,26 @@ typedef uint8_t serstatus_t; #define SERRF_NOISEERROR 0 /**< Unsupported */ +/** + * SPI clock polarity. + * + * $WIZARD_LIST = { + * "ser_spi_pol" : ["SPI_NORMAL_LOW", "SPI_NORMAL_HIGH"] + * } + */ +#define SPI_NORMAL_LOW 0 +#define SPI_NORMAL_HIGH 1 + +/** + * SPI clock phase. + * + * $WIZARD_LIST = { + * "ser_spi_phase": ["SPI_SAMPLE_ON_FIRST_EDGE", "SPI_SAMPLE_ON_SECOND_EDGE"] + * } + */ +#define SPI_SAMPLE_ON_FIRST_EDGE 0 +#define SPI_SAMPLE_ON_SECOND_EDGE 1 + /** * \name Serial hw numbers *