You are correct, those names are unfortunate interpretations of the descriptions in the EP915 manual. You may also use (0/1) as these values are written to the correct bits in the SSPCR0 register.
LEADING/TRAILING would be better as FIRST_EDGE/SECOND_EDGE.
quote:[i]Originally posted by beitman[/i] [br]You are correct, those names are unfortunate interpretations of the descriptions in the EP915 manual. You may also use (0/1) as these values are written to the correct bits in the SSPCR0 register.
LEADING/TRAILING would be better as FIRST_EDGE/SECOND_EDGE.
POSITIVE/NEGATIVE would be better as LOW/HIGH
So, based on the code snippet, what does the clock look like and when is the data "clocked"? In SPI lingo a clock polarity of low/negative would mean the clock is Low when not active.
sspConfig.sspClkPolarity is used to set the SPO bit in the SSPCR0 register of the SSP controller on the EP9315. The description of that bit from the EP9315 Users Guide is:
"When the SPO clock polarity control bit is LOW, it produces a steady state low value on SCLKOUT pin. If the SPO clock polarity control bit is HIGH, a steady state high value is place on the SCLKOUT pin when data is not being transferred."
Per the EP9315 Users Guide, for Motorola SPI protocol, you would set