import { Component, Pin } from "@typecad/typecad";
/**
 | Pin # | Name | Type          |
 | --:   | :--  | :--           |
 | 1     | VBUS  | bidirectional |
 | 2     | ISET  | input         |
 | 3     | VSS   | power_in      |
 | 4     | VTSB  | output        |
 | 5     | TS    | input         |
 | 6     | PG    | open_collector|
 | 7     | EN    | input         |
 | 8     | CHG   | open_collector|
 | 9     | VDPM  | input         |
 | 10    | BAT   | bidirectional |
 | 11    | EP    | passive       |
 */
export class BQ24210DQCR extends Component {
    VBUS = new Pin(this.reference, 1, 'bidirectional', this, {
        minimum_voltage: -0.3,
        maximum_voltage: 20
    });
    ISET = new Pin(this.reference, 2, 'input', this, {
        minimum_voltage: -0.3,
        maximum_voltage: 7
    });
    VSS = new Pin(this.reference, 3, 'power_in', this, {
        minimum_voltage: -0.3,
        maximum_voltage: 7
    });
    VTSB = new Pin(this.reference, 4, 'output', this, {
        minimum_voltage: -0.3,
        maximum_voltage: 7
    });
    TS = new Pin(this.reference, 5, 'input', this, {
        minimum_voltage: -0.3,
        maximum_voltage: 7
    });
    PG = new Pin(this.reference, 6, 'open_collector', this, {
        minimum_voltage: -0.3,
        maximum_voltage: 7
    });
    EN = new Pin(this.reference, 7, 'input', this, {
        minimum_voltage: -0.3,
        maximum_voltage: 7
    });
    CHG = new Pin(this.reference, 8, 'open_collector', this, {
        minimum_voltage: -0.3,
        maximum_voltage: 7
    });
    VDPM = new Pin(this.reference, 9, 'input', this, {
        minimum_voltage: -0.3,
        maximum_voltage: 7
    });
    BAT = new Pin(this.reference, 10, 'bidirectional', this, {
        minimum_voltage: -0.3,
        maximum_voltage: 7
    });
    EP = new Pin(this.reference, 11, 'passive', this, {
        minimum_voltage: -0.3,
        maximum_voltage: 7
    });
    
    constructor(reference?: string | undefined) {
        super({ 
            reference: reference, 
            footprint: "lib:WSON-10_L3.0-W2.0-P0.50-BL-EP", 
            symbol: "BQ24210DQCR:BQ24210DQCR",
            description: "800-mA, Single-Input, Single-Cell Li-Ion Battery Solar Charger",
            datasheet: "https://www.ti.com/lit/ds/symlink/bq24210.pdf"
        });
    }
}