Skip to content

Commit

Permalink
Wiki 1.0 Publishment
Browse files Browse the repository at this point in the history
  • Loading branch information
berndoJ committed Sep 9, 2019
1 parent 501b352 commit c4230c7
Show file tree
Hide file tree
Showing 10 changed files with 143 additions and 119 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# IS31FL3236 STM32 HAL Driver
NOTE: This repository is still in the beta phase, so some parts are not finished yet.

This project is a driver for the IS31FL3236 IC from ISSI for use with the STM32 and the HAL library from ST. The whole driver is designed to work with the HAL / Cube(MX) library of ST, but can be portet to other hardwares.

## Implementation
This driver can be implemented in to any STM32 project built upon the HAL library of ST. More information on the implementation can be found on the GitHub wiki of this repository.

This driver can be implemented in to any STM32 project built upon the HAL library of ST. More information on the implementation can be found on the [GitHub-Wiki](https://github.com/berndoJ/IS31FL3236_STM32_HAL_Driver/wiki) of this repository.

## Contributors

This driver was created by Johannes Berndorfer (berndoJ) in April 2019.
4 changes: 3 additions & 1 deletion doc/Home.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ The IS31FL3236 chip is a general purpose digital LED driver chip which can be co

## How?

To get started using this library refer to the [Getting Started](https://github.com/berndoJ/IS31FL3236_STM32_HAL_Driver/wiki/Getting-Started) page. A further description on how to use this library can be found at the [Using the IS31FL3236 STM32 HAL Driver Library](https://github.com/berndoJ/IS31FL3236_STM32_HAL_Driver/wiki/Using-the-IS31FL3236-STM32-HAL-Driver-Library) wiki-page.
To get started using this library refer to the [Getting Started](https://github.com/berndoJ/IS31FL3236_STM32_HAL_Driver/wiki/Getting-Started) page. A further description on how to use this library can be found at the [Using the IS31FL3236 STM32 HAL Driver Library](https://github.com/berndoJ/IS31FL3236_STM32_HAL_Driver/wiki/Using-the-IS31FL3236-STM32-HAL-Driver-Library) wiki-page.

If you are experiencing any issues, feel free to open a new issue on the GitHub.
24 changes: 24 additions & 0 deletions doc/IS31FL3236_SetSoftwareShutdown Function.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
### Declaration

```c
void IS31FL3236_SetSoftwareShutdown(IS31FL3236_HandleTypeDef* handle, uint8_t software_shutdown_mode);
```
### Parameters
- **handle** [`IS31FL3236_HandleTypeDef*`]: The handle instance of the IS31FL3236 chip.
- **software_shutdown_mode** [`uint8_t`]: The new software shutdown mode the chip should enter. Use the
definitions `IS31FL3236_SOFTWARE_SHUTDOWN_ENABLED` and `IS31FL3236_SOFTWARE_SHUTDOWN_DISABLED` to specify
the shutdown mode.
### Description
This function sets the IS31FL3236 chip into the given software shutdown mode. For further
information about shutdown modes refer to the datasheet. ([Link to IS31FL3236 Datasheet](http://www.issi.com/WW/pdf/31FL3236.pdf)
### Example
```c
// Set the chip into software enabled mode (disable shutdown mode)
IS31FL3236_SetSoftwareShutdown(p_hIS31FL3236, IS31FL3236_SOFTWARE_SHUTDOWN_DISABLED);
```
27 changes: 27 additions & 0 deletions doc/IS31FL3236_WriteGlobalLEDControl Function.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
### Declaration

```c
void IS31FL3236_WriteGlobalLEDControl(IS31FL3236_HandleTypeDef* handle, uint8_t led_current_setting, uint8_t led_state);
```
### Parameters
- **handle** [`IS31FL3236_HandleTypeDef*`]: The handle instance of the IS31FL3236 chip.
- **led_current_setting** [`uint8_t`]: The new LED current setting of all channels. Use the definitions `IS31FL3236_LED_CURRENT_MAX`, `IS31FL3236_LED_CURRENT_MAX_DIV_2`, `IS31FL3236_LED_CURRENT_MAX_DIV_3`, `IS31FL3236_LED_CURRENT_MAX_DIV_4` to specify the current mode.
- **led_state** [`uint8_t`]: The new LED state of all channels. Use the definitions `IS31FL3236_LED_STATE_OFF` and `IS31FL3236_LED_STATE_ON` to specify the LED mode.
### Description
This function is identical to the `IS31FL3236_WriteLEDControl` function, but insted of changing
the LED current control and state of one channel, it changes these values globally. This function
uses a special harware command (see datasheet), thus it is faster than looping over all channels
and changing the values seperately.
### Example
```c
// Set the basic global LED current mode and state settings. (Turn on all channels to the max. current)
IS31FL3236_WriteGlobalLEDControl(p_hIS31FL3236, IS31FL3236_LED_CURRENT_MAX, IS31FL3236_LED_STATE_ON);
// Send an update command to the chip.
IS31FL3236_Update(p_hIS31FL3236);
```
27 changes: 27 additions & 0 deletions doc/IS31FL3236_WriteLEDControl Function.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
### Declaration

```c
void IS31FL3236_WriteLEDControl(IS31FL3236_HandleTypeDef* handle, uint8_t channel, uint8_t led_current_setting, uint8_t led_state);
```
### Parameters
- **handle** [`IS31FL3236_HandleTypeDef*`]: The handle instance of the IS31FL3236 chip.
- **channel** [`uint8_t`]: The channel number (0 - 35) to change the PWM value of.
- **led_current_setting** [`uint8_t`]: The new LED current setting of the specified channel. Use the definitions `IS31FL3236_LED_CURRENT_MAX`, `IS31FL3236_LED_CURRENT_MAX_DIV_2`, `IS31FL3236_LED_CURRENT_MAX_DIV_3`, `IS31FL3236_LED_CURRENT_MAX_DIV_4` to specify the current mode of the channel.
- **led_state** [`uint8_t`]: The new LED state of the specified channel. Use the definitions `IS31FL3236_LED_STATE_OFF` and `IS31FL3236_LED_STATE_ON` to specify the LED mode.
### Description
This function sets the LED current mode and state of a specified channel. Further
information about the LED current mode and state can be found in the manufacturer's
datasheet of the IS31FL3236 IC. ([Link to IS31FL3236 Datasheet](http://www.issi.com/WW/pdf/31FL3236.pdf)
### Example
```c
// Set the LED current mode and state.
IS31FL3236_WriteLEDControl(p_hIS31FL3236, 3, IS31FL3236_LED_CURRENT_MAX_DIV_2, IS31FL3236_LED_STATE_ON);
// Send the chip and update command.
IS31FL3236_Update(p_hIS31FL3236);
```
13 changes: 12 additions & 1 deletion doc/IS31FL3236_WritePWM Function.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,22 @@ void IS31FL3236_WritePWM(IS31FL3236_HandleTypeDef* handle, uint8_t channel, uint
```
### Parameters
- **handle** [`IS31FL3236_HandleTypeDef*`]: The handle instance of the IS31FL3236 chip.
- **channel** [`uint8_t`]: The channel number (0 - 35) to change the PWM value of.
- **pwm_value** [`uint8_t`]: The new PWM-value to write to the given channel.
### Description
This function changes the PWM value of a given LED channel (0 - 35). The function
`IS31FL3236_Update` has to be called afterwards to update the LED
channels to the new value.
channels to the new value.
### Example
```c
// Set the PWM value of channel (ID) 8 to 200.
IS31FL3236_WritePWM(p_hIS31FL3236, 8, 200);
// Send the chip an update command.
IS31FL3236_Update(p_hIS31FL3236);
```
11 changes: 10 additions & 1 deletion doc/IS31FL3236_WriteRGBPWM Function.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,13 @@ void IS31FL3236_WriteRGBPWM(IS31FL3236_HandleTypeDef* handle, uint8_t rgb_channe
This function changes the color of a given RGB LED channel (0 - 11). The function
`IS31FL3236_Update` has to be called afterwards to update the LED
channels to the new value.
channels to the new value.
### Example
```c
// Set the color of RGB channel 0 to #FF00FF (Violet / Purple)
IS31FL3236_WriteRGBPWM(p_hIS31FL3236, 0, 0xFF, 0x00, 0xFF);
// Send the chip an update command.
IS31FL3236_Update(p_hIS31FL3236);
```
32 changes: 32 additions & 0 deletions doc/IS31FL3236_WriteRegister Function.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
### Declaration

```c
void IS31FL3236_WriteRegister(IS31FL3236_HandleTypeDef* handle, uint8_t register_address, uint8_t value);
```
### Parameters
- **handle** [`IS31FL3236_HandleTypeDef*`]: The handle instance of the IS31FL3236 chip.
- **register_address** [`uint8_t`]: The address of the register on the IS31FL3236 chip to write to. The register addresses can be looked up in the datasheet of the IS31FL3236 or can be retrieved by using the included definitions (see Register Address Definitions).
### Description
This function can be used to manually write to an internal register on the IS31FL3236 chip.
### Register Address Definitions
This library contains a collection of definitions that can be used to retrieve the addresses of the IS31FL3236's internal registers. The following list contains all available register address definitions.
- `IS31FL3236_REGISTER_SHUTDOWN` - Shutdown Register - `0x00`
- `IS31FL3236_REGISTER_PWM` - First PWM value register - `0x01`
- `IS31FL3236_REGISTER_LED_CTRL` - First LED control register - `0x26`
- `IS31FL3236_REGISTER_UPDATE` - Update initiation register - `0x25`
- `IS31FL3236_REGISTER_GLOBAL_CTRL` - Global LED control register - `0x4a`
- `IS31FL3236_REGISTER_RESET` - Reset initiation register - `0x4f`
### Example
```c
// Write 0x00 to the update register - similar to IS31FL3236_Update function.
IS31FL3236_WriteRegister(p_hIS31FL3236, IS31FL3236_REGISTER_UPDATE, 0x00);
```
2 changes: 2 additions & 0 deletions inc/is31fl3236_driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ extern "C"

#include <stm32f1xx_hal.h> // Include ST's HAL library for the STM32. The correct library for the platform has to be chosen.

// Definitions of values for updating and changing settings of the IC. These values have been retrieved from the IS31FL3236's datasheet.

#define IS31FL3236_I2C_AD_TO_GND 0x00
#define IS31FL3236_I2C_AD_TO_SCL 0x02
#define IS31FL3236_I2C_AD_TO_SDA 0x04
Expand Down
114 changes: 0 additions & 114 deletions raw_documentation.txt

This file was deleted.

0 comments on commit c4230c7

Please sign in to comment.