Skip to content

Commit b4eaece

Browse files
committed
Improved code visibility
1 parent a9004c5 commit b4eaece

File tree

5 files changed

+150
-151
lines changed

5 files changed

+150
-151
lines changed

content/documentation/PinePhone/Further_information/Sensors_and_navigation.md

Lines changed: 90 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -73,100 +73,100 @@ TODO: i2cdev, linux-iio, support matrix
7373
* MPU6050:inv_mpu6050, inv_mpu6050_i2c, industrialio
7474

7575
```
76-
iio:device2: mpu6050 (buffer capable)
77-
9 channels found:
78-
accel_x: (input, index: 0, format: be:S16/16>>0)
79-
6 channel-specific attributes found:
80-
attr 0: calibbias value: -2102
81-
attr 1: matrix value: 0, 0, 0; 0, 0, 0; 0, 0, 0
82-
attr 2: mount_matrix value: 0, 1, 0; -1, 0, 0; 0, 0, -1
83-
attr 3: raw value: 912
84-
attr 4: scale value: 0.000598
85-
attr 5: scale_available value: 0.000598 0.001196 0.002392 0.004785
86-
accel_y: (input, index: 1, format: be:S16/16>>0)
87-
6 channel-specific attributes found:
88-
attr 0: calibbias value: 941
89-
attr 1: matrix value: 0, 0, 0; 0, 0, 0; 0, 0, 0
90-
attr 2: mount_matrix value: 0, 1, 0; -1, 0, 0; 0, 0, -1
91-
attr 3: raw value: 516
92-
attr 4: scale value: 0.000598
93-
attr 5: scale_available value: 0.000598 0.001196 0.002392 0.004785
94-
accel_z: (input, index: 2, format: be:S16/16>>0)
95-
6 channel-specific attributes found:
96-
attr 0: calibbias value: 1242
97-
attr 1: matrix value: 0, 0, 0; 0, 0, 0; 0, 0, 0
98-
attr 2: mount_matrix value: 0, 1, 0; -1, 0, 0; 0, 0, -1
99-
attr 3: raw value: 15860
100-
attr 4: scale value: 0.000598
101-
attr 5: scale_available value: 0.000598 0.001196 0.002392 0.004785
102-
temp: (input)
103-
3 channel-specific attributes found:
104-
attr 0: offset value: 12420
105-
attr 1: raw value: -1073
106-
attr 2: scale value: 2.941176
107-
anglvel_x: (input, index: 4, format: be:S16/16>>0)
108-
5 channel-specific attributes found:
109-
attr 0: calibbias value: 0
110-
attr 1: mount_matrix value: 0, 1, 0; -1, 0, 0; 0, 0, -1
111-
attr 2: raw value: -32
112-
attr 3: scale value: 0.001064724
113-
attr 4: scale_available value: 0.000133090 0.000266181 0.000532362 0.001064724
114-
anglvel_y: (input, index: 5, format: be:S16/16>>0)
115-
5 channel-specific attributes found:
116-
attr 0: calibbias value: 0
117-
attr 1: mount_matrix value: 0, 1, 0; -1, 0, 0; 0, 0, -1
118-
attr 2: raw value: 4
119-
attr 3: scale value: 0.001064724
120-
attr 4: scale_available value: 0.000133090 0.000266181 0.000532362 0.001064724
121-
anglvel_z: (input, index: 6, format: be:S16/16>>0)
122-
5 channel-specific attributes found:
123-
attr 0: calibbias value: 0
124-
attr 1: mount_matrix value: 0, 1, 0; -1, 0, 0; 0, 0, -1
125-
attr 2: raw value: 0
126-
attr 3: scale value: 0.001064724
127-
attr 4: scale_available value: 0.000133090 0.000266181 0.000532362 0.001064724
128-
timestamp: (input, index: 7, format: le:S64/64>>0)
129-
gyro: (input, WARN:iio_channel_get_type()=UNKNOWN)
130-
1 channel-specific attributes found:
131-
attr 0: matrix value: 0, 0, 0; 0, 0, 0; 0, 0, 0
132-
3 device-specific attributes found:
133-
attr 0: current_timestamp_clock value: realtime
134-
attr 1: sampling_frequency value: 50
135-
attr 2: sampling_frequency_available value: 10 20 50 100 200 500
136-
2 buffer-specific attributes found:
137-
attr 0: data_available value: 0
138-
attr 1: watermark value: 1
139-
Current trigger: trigger1(mpu6050-dev2)
76+
iio:device2: mpu6050 (buffer capable)
77+
9 channels found:
78+
accel_x: (input, index: 0, format: be:S16/16>>0)
79+
6 channel-specific attributes found:
80+
attr 0: calibbias value: -2102
81+
attr 1: matrix value: 0, 0, 0; 0, 0, 0; 0, 0, 0
82+
attr 2: mount_matrix value: 0, 1, 0; -1, 0, 0; 0, 0, -1
83+
attr 3: raw value: 912
84+
attr 4: scale value: 0.000598
85+
attr 5: scale_available value: 0.000598 0.001196 0.002392 0.004785
86+
accel_y: (input, index: 1, format: be:S16/16>>0)
87+
6 channel-specific attributes found:
88+
attr 0: calibbias value: 941
89+
attr 1: matrix value: 0, 0, 0; 0, 0, 0; 0, 0, 0
90+
attr 2: mount_matrix value: 0, 1, 0; -1, 0, 0; 0, 0, -1
91+
attr 3: raw value: 516
92+
attr 4: scale value: 0.000598
93+
attr 5: scale_available value: 0.000598 0.001196 0.002392 0.004785
94+
accel_z: (input, index: 2, format: be:S16/16>>0)
95+
6 channel-specific attributes found:
96+
attr 0: calibbias value: 1242
97+
attr 1: matrix value: 0, 0, 0; 0, 0, 0; 0, 0, 0
98+
attr 2: mount_matrix value: 0, 1, 0; -1, 0, 0; 0, 0, -1
99+
attr 3: raw value: 15860
100+
attr 4: scale value: 0.000598
101+
attr 5: scale_available value: 0.000598 0.001196 0.002392 0.004785
102+
temp: (input)
103+
3 channel-specific attributes found:
104+
attr 0: offset value: 12420
105+
attr 1: raw value: -1073
106+
attr 2: scale value: 2.941176
107+
anglvel_x: (input, index: 4, format: be:S16/16>>0)
108+
5 channel-specific attributes found:
109+
attr 0: calibbias value: 0
110+
attr 1: mount_matrix value: 0, 1, 0; -1, 0, 0; 0, 0, -1
111+
attr 2: raw value: -32
112+
attr 3: scale value: 0.001064724
113+
attr 4: scale_available value: 0.000133090 0.000266181 0.000532362 0.001064724
114+
anglvel_y: (input, index: 5, format: be:S16/16>>0)
115+
5 channel-specific attributes found:
116+
attr 0: calibbias value: 0
117+
attr 1: mount_matrix value: 0, 1, 0; -1, 0, 0; 0, 0, -1
118+
attr 2: raw value: 4
119+
attr 3: scale value: 0.001064724
120+
attr 4: scale_available value: 0.000133090 0.000266181 0.000532362 0.001064724
121+
anglvel_z: (input, index: 6, format: be:S16/16>>0)
122+
5 channel-specific attributes found:
123+
attr 0: calibbias value: 0
124+
attr 1: mount_matrix value: 0, 1, 0; -1, 0, 0; 0, 0, -1
125+
attr 2: raw value: 0
126+
attr 3: scale value: 0.001064724
127+
attr 4: scale_available value: 0.000133090 0.000266181 0.000532362 0.001064724
128+
timestamp: (input, index: 7, format: le:S64/64>>0)
129+
gyro: (input, WARN:iio_channel_get_type()=UNKNOWN)
130+
1 channel-specific attributes found:
131+
attr 0: matrix value: 0, 0, 0; 0, 0, 0; 0, 0, 0
132+
3 device-specific attributes found:
133+
attr 0: current_timestamp_clock value: realtime
134+
attr 1: sampling_frequency value: 50
135+
attr 2: sampling_frequency_available value: 10 20 50 100 200 500
136+
2 buffer-specific attributes found:
137+
attr 0: data_available value: 0
138+
attr 1: watermark value: 1
139+
Current trigger: trigger1(mpu6050-dev2)
140140
```
141141
* LIS3MDL: st_sensors, st_sensors_i2c, st_magn, st_magn_i2c, industrialio
142142

143143
```
144-
iio:device1: lis3mdl (buffer capable)
145-
4 channels found:
146-
magn_x: (input, index: 0, format: le:S16/16>>0)
147-
3 channel-specific attributes found:
148-
attr 0: raw value: 6766
149-
attr 1: scale value: 0.000146
150-
attr 2: scale_available value: 0.000146 0.000292 0.000438 0.000584
151-
magn_y: (input, index: 1, format: le:S16/16>>0)
152-
3 channel-specific attributes found:
153-
attr 0: raw value: -2046
154-
attr 1: scale value: 0.000146
155-
attr 2: scale_available value: 0.000146 0.000292 0.000438 0.000584
156-
magn_z: (input, index: 2, format: le:S16/16>>0)
157-
3 channel-specific attributes found:
158-
attr 0: raw value: 12726
159-
attr 1: scale value: 0.000146
160-
attr 2: scale_available value: 0.000146 0.000292 0.000438 0.000584
161-
timestamp: (input, index: 3, format: le:S64/64>>0)
162-
3 device-specific attributes found:
163-
attr 0: current_timestamp_clock value: realtime
164-
attr 1: sampling_frequency value: 1
165-
attr 2: sampling_frequency_available value: 1 2 3 5 10 20 40 80
166-
2 buffer-specific attributes found:
167-
attr 0: data_available value: 0
168-
attr 1: watermark value: 1
169-
Current trigger: trigger0(lis3mdl-trigger)
144+
iio:device1: lis3mdl (buffer capable)
145+
4 channels found:
146+
magn_x: (input, index: 0, format: le:S16/16>>0)
147+
3 channel-specific attributes found:
148+
attr 0: raw value: 6766
149+
attr 1: scale value: 0.000146
150+
attr 2: scale_available value: 0.000146 0.000292 0.000438 0.000584
151+
magn_y: (input, index: 1, format: le:S16/16>>0)
152+
3 channel-specific attributes found:
153+
attr 0: raw value: -2046
154+
attr 1: scale value: 0.000146
155+
attr 2: scale_available value: 0.000146 0.000292 0.000438 0.000584
156+
magn_z: (input, index: 2, format: le:S16/16>>0)
157+
3 channel-specific attributes found:
158+
attr 0: raw value: 12726
159+
attr 1: scale value: 0.000146
160+
attr 2: scale_available value: 0.000146 0.000292 0.000438 0.000584
161+
timestamp: (input, index: 3, format: le:S64/64>>0)
162+
3 device-specific attributes found:
163+
attr 0: current_timestamp_clock value: realtime
164+
attr 1: sampling_frequency value: 1
165+
attr 2: sampling_frequency_available value: 1 2 3 5 10 20 40 80
166+
2 buffer-specific attributes found:
167+
attr 0: data_available value: 0
168+
attr 1: watermark value: 1
169+
Current trigger: trigger0(lis3mdl-trigger)
170170
```
171171

172172
### Userspace services

content/documentation/PineTime/Flashing/External_flash_partitioning.md

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -56,28 +56,27 @@ Location of partition table: first page of external flash (256 bytes).
5656
C code:
5757

5858
```
59-
#define OFFSET_T uint32_t
60-
#define SIZE_T uint32_t
61-
62-
/* bits 0-7 is type, bits 8-15 is subtype, bits 16-31 are flags */
63-
#define TYPE_T uint32_t
64-
65-
struct partition_entry_t {
66-
OFFSET_T offset;
67-
SIZE_T size;
68-
TYPE_T type;
69-
};
70-
71-
struct partition_table_t {
72-
uint32_t magic_bytes; /* always 0x50494e45 ("PINE") */
73-
uint32_t reserved[2]; /* reserved, do not use */
74-
partition_entry_t entries[20]; /* 20*sizeof(partition_entry_t) == 240 */
75-
uint32_t checksum; /* CRC-32 MPEG2 variant (used by MCU bootloader) */
76-
};
77-
78-
#define PARTITION_TYPE_NOT_USED 0x00
79-
#define PARTITION_TYPE_BOOT_LOGO 0x01
80-
#define PARTITION_TYPE_FACTORY_IMG 0x02
81-
#define PARTITION_TYPE_LITTLE_FS 0x03
82-
59+
#define OFFSET_T uint32_t
60+
#define SIZE_T uint32_t
61+
62+
/* bits 0-7 is type, bits 8-15 is subtype, bits 16-31 are flags */
63+
#define TYPE_T uint32_t
64+
65+
struct partition_entry_t {
66+
OFFSET_T offset;
67+
SIZE_T size;
68+
TYPE_T type;
69+
};
70+
71+
struct partition_table_t {
72+
uint32_t magic_bytes; /* always 0x50494e45 ("PINE") */
73+
uint32_t reserved[2]; /* reserved, do not use */
74+
partition_entry_t entries[20]; /* 20*sizeof(partition_entry_t) == 240 */
75+
uint32_t checksum; /* CRC-32 MPEG2 variant (used by MCU bootloader) */
76+
};
77+
78+
#define PARTITION_TYPE_NOT_USED 0x00
79+
#define PARTITION_TYPE_BOOT_LOGO 0x01
80+
#define PARTITION_TYPE_FACTORY_IMG 0x02
81+
#define PARTITION_TYPE_LITTLE_FS 0x03
8382
```

content/documentation/PineTime/Watchfaces/Custom_watchface.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -554,14 +554,14 @@ Clock::Clock(DisplayApp* app,...){...
554554
region (the watchface function), you need to place a particular set of lines which LVGL uses to define the object to declare the array as an Icon/Image, You can place this set of lines above _label_time_.
555555
556556
```CPP
557-
<name>.header.always_zero = 0; //Initialization
558-
<name>.header.w = <picture_X>; // Setting the Width (or) Horizontal length of the image (number of px)
559-
<name>.header.h = <picture_Y>; // Setting the Height (or) vertical length of the image (number of px)
560-
<name>.data_size = <Hr_length> * <Vr_length> * LV_COLOR_SIZE / 8; //Allocation of memory for the image
561-
<name>.header.cf = LV_IMG_CF_TRUE_COLOR; // Sets the color scheme for the image
562-
<name>.data = <name>_map; // Maps the Image data to the Array
563-
lv_obj_t *img_src = lv_img_create(lv_scr_act(), NULL); // Create an image object
564-
lv_img_set_src(img_src, &<name>); // Set the created file as image (<name>)
557+
<name>.header.always_zero = 0; //Initialization
558+
<name>.header.w = <picture_X>; // Setting the Width (or) Horizontal length of the image (number of px)
559+
<name>.header.h = <picture_Y>; // Setting the Height (or) vertical length of the image (number of px)
560+
<name>.data_size = <Hr_length> * <Vr_length> * LV_COLOR_SIZE / 8; //Allocation of memory for the image
561+
<name>.header.cf = LV_IMG_CF_TRUE_COLOR; // Sets the color scheme for the image
562+
<name>.data = <name>_map; // Maps the Image data to the Array
563+
lv_obj_t *img_src = lv_img_create(lv_scr_act(), NULL); // Create an image object
564+
lv_img_set_src(img_src, &<name>); // Set the created file as image (<name>)
565565
```
566566

567567
again, make sure to replace <name> with the name you gave it during conversion!

content/documentation/Quartz64/How-Tos/Using_a_battery.md

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -76,33 +76,33 @@ Not all parts of the board can be supplied from the battery. When you use batter
7676
For the battery to be correctly detected, you will need to edit the device tree to add the charger and battery nodes, like this:
7777

7878
```
79-
// add this to root node (you may need to modify the values to fit your chosen battery)
80-
battery: battery {
81-
compatible = "simple-battery";
82-
charge-full-design-microamp-hours = <6400000>;
83-
charge-term-current-microamp = <200000>;
84-
constant-charge-current-max-microamp = <2000000>;
85-
constant-charge-voltage-max-microvolt = <4200000>;
86-
factory-internal-resistance-micro-ohms = <117000>;
87-
voltage-max-design-microvolt = <4200000>;
88-
voltage-min-design-microvolt = <3200000>;
89-
90-
ocv-capacity-celsius = <20>;
91-
ocv-capacity-table-0 = <4200000 100>, <4054000 95>, <3984000 90>, <3926000 85>,
92-
<3874000 80>, <3826000 75>, <3783000 70>, <3746000 65>,
93-
<3714000 60>, <3683000 55>, <3650000 50>, <3628000 45>,
94-
<3612000 40>, <3600000 35>, <3587000 30>, <3571000 25>,
95-
<3552000 20>, <3525000 15>, <3492000 10>, <3446000 5>,
96-
<3400000 0>;
97-
};
98-
99-
// add this to &rk817 node
100-
rk817_charger: charger {
101-
monitored-battery = <&battery>;
102-
rockchip,resistor-sense-micro-ohms = <10000>;
103-
rockchip,sleep-enter-current-microamp = <300000>;
104-
rockchip,sleep-filter-current-microamp = <100000>;
105-
};
79+
// add this to root node (you may need to modify the values to fit your chosen battery)
80+
battery: battery {
81+
compatible = "simple-battery";
82+
charge-full-design-microamp-hours = <6400000>;
83+
charge-term-current-microamp = <200000>;
84+
constant-charge-current-max-microamp = <2000000>;
85+
constant-charge-voltage-max-microvolt = <4200000>;
86+
factory-internal-resistance-micro-ohms = <117000>;
87+
voltage-max-design-microvolt = <4200000>;
88+
voltage-min-design-microvolt = <3200000>;
89+
90+
ocv-capacity-celsius = <20>;
91+
ocv-capacity-table-0 = <4200000 100>, <4054000 95>, <3984000 90>, <3926000 85>,
92+
<3874000 80>, <3826000 75>, <3783000 70>, <3746000 65>,
93+
<3714000 60>, <3683000 55>, <3650000 50>, <3628000 45>,
94+
<3612000 40>, <3600000 35>, <3587000 30>, <3571000 25>,
95+
<3552000 20>, <3525000 15>, <3492000 10>, <3446000 5>,
96+
<3400000 0>;
97+
};
98+
99+
// add this to &rk817 node
100+
rk817_charger: charger {
101+
monitored-battery = <&battery>;
102+
rockchip,resistor-sense-micro-ohms = <10000>;
103+
rockchip,sleep-enter-current-microamp = <300000>;
104+
rockchip,sleep-filter-current-microamp = <100000>;
105+
};
106106
```
107107

108108
You will also need to make sure that CONFIG_CHARGER_RK817 is enabled in your kernel.

themes/pinetheme/assets/css/documentation.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ div#doc-page code {
142142
background-color: #f8f9fa;
143143
border: 1px solid #eaecf0;
144144
line-height: 1.3;
145-
border-radius: 2px;
146-
padding: 0 4px;
145+
border-radius: 4px;
146+
padding: 6px;
147147
/*user-select: all;*/
148148
}
149149
div#doc-page pre {

0 commit comments

Comments
 (0)