Timer/PCA exercises




PCA capture

Write a function that can measure the time elapsed between two edges of a digital signal. The input parameters: type of the first edge (rising or falling), type of the second edge, number that selects a module. The function should return the elapsed time in the units of the period of the counter.