# Source for the button debouncing wave diagram
# Paste into http://wavedrom.com/editor.html
{signal: [
 {name:'current mode',    wave: '3............', data: ['normal button press and release']},
  {name:'physical button', wave: '01......0....'},
  {name:'application ',    wave: '01......0....'},
  {},
 ['bounce mode',
  {name:'current mode',    wave: '4............', data: ['debounced button press']},
  {name:'physical button', wave: '0101...0.....'},
  {name: 'timeouts',       wave: '01...0.1...0.'},
  {name:'application ',    wave: '01.....0.....'},
  {},
  {name:'current mode',    wave: '4............', data: ['debounced button release']},
  {name:'physical button', wave: '1...010......'},
  {name: 'timeouts',       wave: '0...1...0....'},
  {name:'application ',    wave: '1...0........'},
  {},
  {name:'current mode',    wave: '5............', data: ['delayed button press']},
  {name:'physical button', wave: '1...01.......'},
  {name: 'timeouts',       wave: '0...1...0....'},
  {name:'application ',    wave: '1...0...1....'},
  {},
  {name:'current mode',    wave: '5............', data: ['delayed button release']},
  {name:'physical button', wave: '0...10.......'},
  {name: 'timeouts',       wave: '0...1...0....'},
  {name:'application ',    wave: '0...1...0....'},
   ],
  {},
  ['spurious mode',
  {name:'current mode',    wave: '3............', data: ['first spurious button release ']},
  {name:'physical button', wave: '1.......01...'},
  {name:'application ',    wave: '1.......01...'},
  {},
  {name:'current mode',    wave: '3............', data: ['later spurious button release ']},
  {name:'physical button', wave: '1....01......'},
  {name: 'timeouts',       wave: '0....1..0....'},
  {name:'application ',    wave: '1............'},
  {},
  {name:'current mode',    wave: '3............', data: ['delayed release in spurious mode ']},
  {name:'physical button', wave: '1....0.......'},
  {name: 'timeouts',       wave: '0....1..0....'},
  {name:'application ',    wave: '1.......0....'}
   ],

],
 head:{
   text:'Button Debouncing Scenarios',
 },
}
