|
|
| (22 intermediate revisions by the same user not shown) |
| Line 1: |
Line 1: |
|
| |
| <nowiki>
| |
|
| |
|
| char * I2C_Device_Name(int I2C_Bus, byte I2C_Address)
| |
| {
| |
| switch(I2C_Address)
| |
| {
| |
| case 0x26:
| |
| if (I2C_Bus == 0)
| |
| return("????");
| |
| if (I2C_Bus == 1)
| |
| return("ECG w/ NPXL");
| |
| break;
| |
| case 0x29:
| |
| return("VL53L0X");
| |
| break;
| |
| case 0x57:
| |
| return("MAX30102");
| |
| break;
| |
| case 0x5A:
| |
| return("MLX9164");
| |
| break;
| |
| case 0x68:
| |
| if (I2C_Bus == 0)
| |
| return("????");
| |
| if (I2C_Bus == 1)
| |
| return("MPU6050 R");
| |
| break;
| |
| case 0x69:
| |
| if (I2C_Bus == 0)
| |
| return("AMG8833");
| |
| if (I2C_Bus == 1)
| |
| return("MPU6050 G");
| |
| break;
| |
| case 0x70:
| |
| return("TCA9548A");
| |
| case 0x38:
| |
| return("PCF8574");
| |
| break;
| |
| default:
| |
| return("????");
| |
| break;
| |
| }
| |
| }
| |
|
| |
| int CNFG_x_offset = 0;
| |
| int CNFG_y_offset = 0;
| |
| int CNFG_x_width = 128;
| |
| int CNFG_y_height = 160;
| |
|
| |
|
| |
| void ConfigurationScans()
| |
| {
| |
| int configuration_select = 0;
| |
| bool refresh_screen = true;
| |
| int encoder_A = 0;
| |
| int encoder_B = 0;
| |
|
| |
| while(configuration_select != -1)
| |
| {
| |
| switch(configuration_select)
| |
| {
| |
| case 0:
| |
| if (refresh_screen)
| |
| {
| |
| ConfigurationMainUnit();
| |
| Controls.reset_All();
| |
| }
| |
| refresh_screen = false;
| |
| break;
| |
| case 1:
| |
| if (refresh_screen)
| |
| ConfigurationPort(0);
| |
| refresh_screen = false;
| |
| break;
| |
| case 2:
| |
| if (refresh_screen)
| |
| ConfigurationPort(1);
| |
| refresh_screen = false;
| |
| break;
| |
| case 3:
| |
| if (refresh_screen)
| |
| ConfigurationPort(2);
| |
| refresh_screen = false;
| |
| break;
| |
| case 4:
| |
| if (refresh_screen)
| |
| ConfigurationPort(3);
| |
| refresh_screen = false;
| |
| break;
| |
| }
| |
|
| |
| if (Controls.pcf_event)
| |
| {
| |
| encoder_A = Controls.encoder_A_Dir();
| |
| encoder_B = Controls.encoder_B_Dir();
| |
|
| |
|
| |
|
| |
| </nowiki>
| |
|
| |
| [[Pseudo-Medical_Monitor_Code#Custom_Includes]]
| |