Browse Source

add analogWriteResolution()

teensy4-core
PaulStoffregen 6 years ago
parent
commit
efc41ea92d
1 changed files with 9 additions and 1 deletions
  1. +9
    -1
      teensy4/pwm.c

+ 9
- 1
teensy4/pwm.c View File



uint32_t analogWriteRes(uint32_t bits) uint32_t analogWriteRes(uint32_t bits)
{ {
return 0;
uint32_t prior;
if (bits < 1) {
bits = 1;
} else if (bits > 16) {
bits = 16;
}
prior = analog_write_res;
analog_write_res = bits;
return prior;
} }





Loading…
Cancel
Save