You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-3Lines changed: 10 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@ These are all of the files we've created to make the project more *readable*:
64
64
- Here we have some *utility functionality* like:
65
65
- A **Delay** method with it's **interrupt handler** and a function to **enable or disable**`systicks`.
66
66
- A method to **initialize the LED's** and to **turn on or off LED0**.
67
-
- A method to **stop code execution when an error occured**.
67
+
- A method to **stop code execution when an `error` occured** and flash the LED's to indicate this.
68
68
69
69
-`handlers.c` (& `handlers.h`)
70
70
- Here we've gathered the *interrupt handlers* for **`RTC compare`** and **odd and even pin interrupts**.
@@ -76,7 +76,7 @@ These are all of the files we've created to make the project more *readable*:
76
76
-`void initADXL_SPI (void)`: Initialize the SPI pins and settings to communicate with the accelerometer.
77
77
-`void testADXL (void)`: Test all the ODR (Output Data Rate) settings to see the effect they have on power.
78
78
-`void readValuesADXL (void)`: Read and display the X-Y-Z g-values on UART.
79
-
-`void resetHandlerADXL (void)`: This method tries to read the sensor ID. If this fails it tries to soft reset it and tries to read the ID again after a second. If this fails again the power to the sensor is turned off for one second. If the ID check fails again after this, the code stops executing and the `error` method is called.
79
+
-`void resetHandlerADXL (void)`: This method tries to read the sensor ID. If this fails it tries to *soft reset* it and tries to read the ID again after a delay of one second. If this fails again the power to the sensor is turned off for one second. If the ID check fails again after this, the code stops executing and the `error` method is called.
80
80
-`uint8_t readADXL (uint8_t address)`: Read one byte of data from a given register address. This method is called by other methods like `readADXL_XYZDATA`.
81
81
-`void writeADXL (uint8_t address, uint8_t data)`: Write one byte of data to a given register address. This method is called by other methods like `configADXL_ODR`, `configADXL_range`, ... .
82
82
-`void readADXL_XYZDATA (void)`: Read the X-Y-Z data registers using *burst reads* and put the response data in the global array.
@@ -95,7 +95,14 @@ These are all of the files we've created to make the project more *readable*:
-**(\*1):** Every minute the RTC compare function will give an interrupt to wakeup the microcontroller.
103
+
-**(\*2):** This handler tries to read the sensor ID. If this fails it tries to *soft reset* it and tries to read the ID again after a delay of one second. If this fails again the power to the sensor is turned off for one second. If the ID check fails again after this, the code stops executing and the `error` method is called.
104
+
-**(\*3):** Every minute an interrupt gets generated by the Real Time Counter Compare functionality.
105
+
-**(\*4):** This can be a button (`PB0` or `PB1`) interrupt or an interrupt generated by the **accelerometer** if the activity threshold is surpassed.
0 commit comments