Step 8.1 - Adding application files
The modified application files app.c and app.h are developed for this lab. Copy these files from the dev_files folder of this lab at
apps\training\middleware\live_photoframe\live_photoframe_lab\dev_files and place them in apps\training\middleware\dev\live_photoframe\live_photoframe_lab\firmware\src. These files will replace the original app.c and app.h.
Step 8.2 - Modifying system_config.h
You need to add application specific definitions in the system_config.h file.
Open system_config.h and add the following code in the Application Configuration section:
Step 8.3 - Configuring the Application Switch
In this application, you need a button-press event to trigger a photo-capture. To achieve this, you have to configure a Change Notification for the S1 switch on the MEBII board, which is connected to GPIO:RA0. Change the handler code of the Change Notification which is present in system_interrupts.c.
2
Modifying the Interrupt Handler for Change Notification of Port A in system_interrupts.c
Step 8.4 - Replacing the Camera driver in the Harmony Framework
This step is needed to work around an issue related to Harmony version 2.01b The Camera driver file drv_camera_ovm7690.c needs to be replaced.
The Camera driver in the MPLAB Harmony v2.01b does not support the dynamic implementation of the timer driver. However, the TCP/IP stack (which is required for this lab) requires a timer of dynamic driver implementation. To accommodate this, the Camera driver has been modified.
Replace the existing Harmony Camera driver file drv_camera_ovm7690.c.
Copy the drv_camera_ovm7690.c file from this folder:
apps/training/middleware/live_photoframe/live_photoframe_lab/dev_files/source_files/
to this one: framework/driver/camera/ovm7690/src/
Make sure you make a backup of the existing drv_camera_ovm7690.c
Step 8.5 - Adding the header file for the I²C driver in the Static Buffer Model
This step is needed to work around an issue related to the legacy Camera driver implementation.
The current versions of MPLAB Harmony support the I²C driver in the Static Buffer Model. However, the Camera driver implementation uses the Static Byte Model.
To overcome this, you must place a header file to avoid compilation issues for the project.
Copy the drv_i2c_static_buffer_model.h file from this folder:
apps/training/middleware/live_photoframe/live_photoframe_lab/dev_files/source_files/
to this one:
live_photoframe_lab/firmware/src/system_config/pic32mz_ef_sk_meb2/framework/driver/i2c
This will overcome the compilation error.